Disable autocomplete on specific exposed filter

Created on 20 November 2024, 2 months ago

When we use an exposed filter (fullxtext field) on different places, all the fields render autocomplete functionnality. I need to disable the autocomplete behavior on a use case.

My views search exposes the fulltext field in a block. This block is rendered inside the header on my site and in the views search page. On the search page, I need to disable the autocomplete behavior. In the settings on this module, I can't disable this functionnality on this specific case.

Is there a solution, with a custom code, to achieve this?

Thanks for your help.

πŸ’¬ Support request
Status

Active

Version

1.9

Component

User interface

Created by

πŸ‡«πŸ‡·France kumkum29

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

Comments & Activities

  • Issue created by @kumkum29
  • πŸ‡¦πŸ‡ΉAustria drunken monkey Vienna, Austria

    In custom code, I think it should be relatively easy (though a bit fiddly) to implement hook_form_views_exposed_form_alter() yourself and just undo the changes done by search_api_autocomplete_form_views_exposed_form_alter() (or \Drupal\search_api_autocomplete\Utility\AutocompleteHelper::alterElement() in particular) to the form structure in the specific cases where you need them. You might just also need to adapt the cache metadata accordingly so the form is not incorrectly cached (not sure if this really needs specific code or will work automatically, just give it a try).

    Unfortunately, I don’t know of any simpler solution, no.

    Hope this helps.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024