Skip to main content

Autocomplete

Autocomplete is a search field with a dropdown that suggests results as the visitor types. It's a filter widget, so you add it to a View like any other filter, and it works with every backend.

Add autocomplete​

  1. Open a View and go to the Filters tab.
  2. Add a filter and set Select type to Autocomplete.
  3. Set the Placeholder text.
  4. Choose the dropdown's sources and what happens on search (below).
  5. Place it with its shortcode.

Use autocomplete instead of a Search Box, not alongside one on the same index.

SourceShows
Hit previewsMatching records; selecting one opens its link. Set the Title field, the Link field (or "Not clickable") and how many to show. On by default, showing 5.
Query completionsDistinct titles of matching records, as suggested search terms.
Recent searchesThe visitor's own recent searches, stored in their browser.
Query Suggestions (Algolia only)Popular searches from an Algolia Query Suggestions index. Enter the index name. Ignored on other backends.

When the visitor presses Enter, autocomplete can either:

  • Filter results on this page: the default, for a search page that already shows results
  • Redirect to a results page: for a search field in a header or sidebar. Enter the Results page URL; the search is added as ?s=…