Use search and search_api_autocomplete form elements for search form and implement auto-submit

Created on 22 June 2023, over 1 year ago
Updated 29 June 2023, over 1 year ago

Problem/Motivation

When I have tried to figure out what could be the best way to get a search input instead of a text field for the search form I discovered that there is also a search_api_autocomplete form element by Search API Autocomplete module. We should use that form element when autocomplete option is enabled.

The benefit of that is that we get an auto-submit functionality OOTB without adding any extra JS to this module.

In case of disabled autocomplete we can safely use an input[type="search"] so people get a clear button for better UX.

If you want to get an input[type="search"] for the autocomplete field you can apply the patch from Use search form element instead of text Needs review .

Feature request
Status

Fixed

Version

1.0

Component

Autocomplete

Created by

🇩🇪Germany yannickoo Berlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024