Skip to content

Commit 9331322

Browse files
authored
Update documentation for search component usage
Clarify usage of search form in template and valueSources.
1 parent 772d560 commit 9331322

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/additional-docs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ $this->loadComponent('Search.Search', [
1212
```
1313

1414
The search component will auto set a `$searchForm` view variable containing the
15-
form instance, for your search actions. You can use the form in your template as:
15+
form instance, for your search actions. You can use the form in your template then.
1616

17+
Make sure to also pass `'data'` now into accepted `valueSources`:
1718
```php
1819
echo $this->Form->create($searchForm, ['valueSources' => ['query', 'data']]);
1920
// Add your search fields here

0 commit comments

Comments
 (0)