Better Exposed Filters

The Better Exposed Filters module replaces the Views' default single- or multi-select boxes with radio buttons or checkboxes, respectively. Description fields and Select All/None links can be added to exposed filters to make for a better user experience.

Views Filters is a powerful tool to refine the results returned by a given view. When you expose a filter, you allow the user to interact with the view making it easy to build a customized, advanced search. For example, exposing the node type field as a filter lets your site visitor limit their search queries to just blog entries. Better Exposed Filters gives you greater control over the rendering of exposed filters.

Why use this module? Because it provides a better user experience than the default option. Try telling a client that they should click on an option, then scroll to the next option and ctrl+click on it. Don't just click 'cause you'll lose your first selection. Oh, and ctrl+click again to unselect an option... Yeah, not user friendly.

People understand checkboxes and radio buttons.

Drupal 8?

Update (21 June 2016): #2651102: Using checkboxes for exposed filters results in zero rows displaying has been committed to the 8.2.x branch of Drupal core. Yea! It blocked a fairly major use-case for BEF so if you are using BEF to convert exposed filters into checkboxes make sure you're build of Drupal 8 includes that fix. And thank you to everyone that worked on that fix.

The Drupal 8 branch is in active development. If you have immediate need of a specific feature in BEF, please contact me to discuss sponsorship. (I work freelance and the time I spend on BEF is donated to the community).

What else can I do with BEF?

The BEF handbook page provides some basic recipes making exposed filters a much better user experience.

  • Add help text for each exposed filter
  • Tame long lists with scrollable checkbox/radio button lists or select all/none links
  • Provide instant feedback by updating the View using AJAX whenever an exposed filter is changed
  • Use the jQuery Slider widget for greater-than, less-than or in-between types of filters

If you've got any ideas not covered on the handbook page, add a feature request to the issue queue. You can also rate this module on DrupalModules.

Versions, versions, versions...

Better Exposed Filters supports both Drupal 6.x and 7.x and Views 2.x and 3.x. Though there is no Views 2.x on Drupal 7.x so only 3.x is supported. Confused? Me too...

Let me make this simple:

  • Drupal 6.x with Views 2.x: Use the 6.x-2.x branch. Once a final 2.0 release is made, this will become a bug-fix-only branch.
  • Drupal 6.x with Views 3.x: Use the 6.x-3.x branch. Some features added to 7.x-3.x may be backported to this branch.
  • Drupal 7.x with Views 3.x: Use the 7.x-3.x branch.

Now that Views 3.x has been released, the Views 3 branches are the "recommended" releases. If you're using Views 2, be careful when using Drush -- you need to specify the 2.x branch. E.g.: drush dl better_exposed_filters-6.x-2.0-beta1

Drupal 7.x Support

The 7.x branch is in active development and where new feature requests should be focused -- 6.x feature request will generally not be considered unless they are accompanied by a patch. :)

Views 3.x Support

Better Exposed Filters works with Views 3.x. Note that there is currently no simple upgrade path from Views 2.x to Views 3.x (see #714444: Need a way to upgrade BEF settings from Views 2.x to Views 3.x) other than rebuilding the BEF settings.

Also, the BEF settings are no longer in the filter options form (as shown in the image above), but in the Exposed Form settings form. See the handbook page's usage section for more details.

What's new?

The 7.x release now includes support for the jQuery UI Datepicker instead of a textbox for date-related fields. Since Drupal 7 ships with jQuery UI in core, my hope is to start offering these as options in BEF. If you have any suggestions, please add a feature request to the issue queue.

(Note: Support for fields supplied by the Date module is a little funky until #392836: Exposed Date filter format (in Views) and/or #502824: Date format in exposed filter (views) are resolved).

Project Information

Downloads