I have two exposed filters Contry (name=field_country_tag_tid) and City (name=field_country_tag_tid_option_limit). Reference limit option Module limet avaliale options in city but not when page with filters loaded at first time. That why I wanted to desable City Filter by using #states
function mymodue_form_views_exposed_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'views_exposed_form' && $form_state['view']->name == 'map') {
$form['field_country_tag_tid_option_limit']['#states'] = array(
'visible' => array('select[name="field_country_tag_tid"]' => array('value' => '1')),
);
}
}
I used the following example http://api.drupal.org/api/examples/form_example!form_example_states.inc/function/form_example_states_form/7
But there are no any changes in my exposed filter, where is my mistake? Thanks