Skip to content

Better Exposed Filter Options

Jen Lampton edited this page Mar 5, 2017 · 2 revisions

The following options are available for exposed filters on Backdrop CMS:

  • Checkboxes/Radio buttons: This option is available for any filter that has a limited number of options. In the filter configuration dialog, tick the Allow multiple selections option to use checkboxes, uncheck it for radio buttons.

  • Links: Styles your filters as links which toggle a given option on/off. Works with both single and multiple selections. Note: there are problems with using the Link style with the Autosubmit option.

  • Hidden: Useful for making multi-page searches so that one page can pass settings along to the next page. See this comment for more details.

  • Nested Checkboxes/Radio Buttons: This option is only available to taxonomy-based filters and requires that Selection type be set to Dropdown and Show hierarchy in dropdown be ticked in the filter configuration dialog. Options will be rendered as nested, unordered lists of either checkboxes or radio buttons. To get nested links from a taxonomy filter, see this possible solution.

  • Single on/off checkbox: This option is only available to Yes/No (boolean) filters such as Node:Published where the Allow multiple selections option is unticked in the filter configuration dialog. Note: there are problems with filters that have a default value because unticked checkboxes are not included when the exposed form is submitted.

  • jQuery UI Datepicker: For date-based filters (either core or through the Date module) textfield filters can be transformed into Datepickers by using this option.

  • jQuery UI Slider: For numeric filters, a jQuery Slider option is now available (currently only in the -dev release). This feature was developed by rooby with sponsorship from herd45.

There is an option move some exposed form elements into a secondary options section. Use this option to move some filters into an "Advanced Search Options" collapsible fieldset to simplify your form. When you tick the Enable secondary exposed form options option, a "This is a secondary option" checkbox will show in the More Options section (Advanced Sort Options for sort elements). Any element with this option ticked will be moved to a collapsible fieldset and displayed right after the exposed filters on the form.

Clone this wiki locally