Don't show submit button for an empty form

Created on 8 July 2024, 2 months ago

Is it possible to hide the submit button when the exposed form is empty?

Use case is as follows:

A view has two exposed filters: search_api fulltext search box and a facets filter. These two forms are split by placing two configurable_views_filter_blocks on the page, one shows the fulltext search box, the other shows the facet filter (in sidebar).

The first input is required, view results aren't displayed until user submits a fulltext search. As such, the facets filter is empty until the user conducts a search.

The issue is the submit button is shown for the empty facet filter form. The solution would be to not show the submit button if the form is empty.

Is this possible (configurable)? If not I'll see if I can fix this at the theme layer. However it would be good if this feature could be added as I think this might be a common use case?

Feature request
Status

Active

Version

1.0

Component

User interface

Created by

🇳🇿New Zealand djroshi

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

Comments & Activities

Production build 0.71.5 2024