Skip to main content

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​

NameTypeDescription
$searchable_fieldsarrayArray of GravityView-formatted fields or field IDs.
$view\ViewObject of View being searched.
$with_full_fieldboolWhether $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