Hi Merlin of Chaos,

Views 2 is fabulous, wow!

I'm wondering .. is there the capability in an exposed view (dropdown, block) to show:

1. only categories that have data (in other words, do not show the 'country' in this case 'a country ie Zimbabwe' if no one has selected that country)

2. if the above is not possible, perhaps to show the 'node count' as selected in Taxonomy admin.

Now if both are possible :) ... to dynamically load, in my case, first 'country' and then 'directory'.

So basically 'when country has been selected', (and, if) only load categories that have been selected in the 'directory'.

Is this perhaps possible please, or a module that implements this functuality?

Most appreciated, and look forward to your reply.
Lilian

Comments

merlinofchaos’s picture

Currently Views does not have this capability.

You could possibly create some code to form_alter the exposed filter and remove categories that do not have data. That's a little bit more than I'm prepared to instruct you on right now, however, you might be able to find some help accomplishing this in the forums.

drupalok’s picture

I'd love this feature! anyone up for programming?

esmerel’s picture

Category: support » feature
dawehner’s picture

Thats the most wanted feature for views :) But i guess sadly this will not be possible, i'm not sure.

The GET commes in, FAPI checks whether the input is valid, so the form has to be loaded from cache/be rebuild. Until then, no query has been run. After the validation views can use the get value to produce the query. As far as i understand its a chicken-egg situation.

dawehner’s picture

Status: Active » Closed (duplicate)

There is a module from joachim.

Alternative you could have a look at #833042: Restrict exposed filters to the result which provides this feature for views 3.x