I am working with Drupal 7.
How do I limit a taxonomy drop-down exposed filter to only display the terms used by nodes in view results?

I understand that the list is populated before the views takes place, but this means that I am often left with tags that display nothing ( since they are hidden with my view).

2 Answers 2


Views Hacks does this with Views Selective Exposed Filters:

Views Selective Exposed Filters

On list and checkbox exposed filters, you can specify the filter option "Limit list to result set" to only display values that are actually returned in the view's results. The filter option "Further limit list to active filters" restricts the displayed values to view results obtained by applying exposed filter values.

  • views hacks is not for drupal 7 Aug 2, 2011 at 6:08
  • There's a release being built drupal.org/node/1180700
    – tostinni
    Aug 2, 2011 at 13:35
  • thanks, why is it not yet on the main module page at drupal? Aug 2, 2011 at 15:11
  • Reading the issue queue, I think they had some troubles with git drupal.org/node/1189032 so it may not be very stable yet, and if you have the expertise maybe it's not so hard to port just this submodule.
    – tostinni
    Aug 2, 2011 at 15:58
  • thanks however this module only hides the terms after the user filters some terms but I want the irrelevant term not to show up at all from the beginning. I have 2 views for 2 different roles & each role tags their content from the same vocabulary but I don't want one role to see the others terms on the exposed filter if it doesn't exist in their view Aug 2, 2011 at 17:12

Now we have Views Selective Filters

From the module page:

This module allows to have an exposed filter only show options that belong to result set.

The options are calculated real-time with the current View's configuration, including the filters selected by the user so you get dynamic dependent filters, that is, when the value of one filter is changed, the list of options of the selective filters are updated accordingly to the trimmed down result set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.