Adding a Search Bar
Back to: Exploring GravityView Layouts
Regardless of which layout you choose, if you have a lot of entries, you may want to add a search bar.
In the Edit View screen, click the Add Widget button in the Above Entries Widgets section. Choose “Search Bar” from the list, then click the gear icon to select your settings.
In the settings you can choose whether you want a horizontal or vertical layout. Next select the fields you would like to be searchable. You can enable search by any fields in the entries, not just the ones displayed in this particular View.
Click the plus next to each field to add another.
Some fields that might make sense for searching in this case include:
- Name
- Company Name
- Job Title
- Search Everything (general search)
You can leave the labels as they originally appear or you can change them for a cleaner look as I’ve done with the Search Everything label. Here is what it looks like:
Finally, choose the Search Mode.
With search parameters like this:
Name: Jane
Job Title: CEO
Match Any Fields will show any entries that match either criteria.
Match All Fields will show only entries that match all criteria.
Here are the complete settings to match my search bar:
Now update your View and you will see your search bar at the top!