hide/show exposed filters based on selected value of the first filter


Issue is on dependent filter module related, but it is not relevant too much because this module not working at all…

Here I have two group of filters of one views display and one filter at the top of exposed filters same view display.

Actually, the filter shows all values related to the first selection just fine. But filters where are no values stays visible.
If you select an option in first filter  “Bilo koji”(Any) it will display all products, and that is ok. But if “Akumulatori ” (Batteries) option is selected related selection values are displayed, but also and filters where is no value for that selection.
The idea is to, as I said in the post title.

I come across on a possible solution:

function YOURTHEME_preprocess_views_exposed_form(&$variables) {
if ($variables['form']['#id'] == 'views-exposed-form-VIEWNAME-DISPLAYID' && empty($variables['form']['field_NAME_FILTER_selective']['#options'])) {


Added function in template.php file but not working ok.

Does anyone have similar problem and also idea how to..

@Admin did I went off topic. Maybe it was better to post in Code related forum ?!

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/22/feed