Filter: gk/gravityview/search/searchable-fields/allowed
Modifies the fields able to be searched using the Search Bar.
With $with_full_field, each entry is an array with field (the field ID or search key), form_id and input. An entry for a search key that is not a form field, such as a map area, can set is_search_key to true; it then stays searchable when "Search Everything" is limited to visible fields. The mark is ignored on a form field.
Parameters
| Name | Type | Description |
|---|---|---|
| $searchable_fields | array | Array of GravityView-formatted fields or field IDs. |
| $view | \View | Object of View being searched. |
| $with_full_field | bool | Whether $searchable_fields contains full field arrays or just IDs. |
Since
- 3.0.0
- 3.7.0: Entries can set
is_search_key.
Source
Defined in src/Search/Policies/SearchFieldsPolicy.php at line 196