Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By sujoyit2005 on
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
You can use hook_form_alter()
Have you tried hook_form_alter() already?
You can use hook_form_alter() to alter it like this
_
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.