I have 3 views for results of 3 different countries AU, UK and US. I have two Taxonomy Vocabolary, one for Country and another for State. I have selected results on 3 views corresponding to country. But, can not show country specific states on the exposed filter dropdown.

Can anybody tell me or guide reference how to show country specific states only on dropdown?

I can not write any module with hook_form_alter(), because exposed form dont support this as i know.

Any suggestion is appreciated.

Comments

ral1239’s picture

Have you tried hook_form_alter() already?

You can use hook_form_alter() to alter it like this

function mymodule_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'form_views_exposed_form') {
    //Do stuff with your exposed filter here..
  }
}
WorldFallz’s picture

indeed, hook_form_alter is how you alter the exposed filter form. But no, there's no 'dependent fields' settings you can just flip to get it-- you have to write the code that makes it work as well. See https://drupal.org/node/752056 for some intro info. Also see https://drupal.org/project/examples.