I have a #states on the exposed filter form as follow:
If field_a == 'b' then field_b show, field_c hidden;
else if field_a == 'c' then field_c show, field_b hidden;
All fields here are Select list.
The states is working fine, problem is the value of the hidden filter is affecting the view result, which i dont want.
Questions:
1) How to change the hidden field value back to default(to -Any- in Select List)? JQuery maybe?
2) How to avoid the hidden filter affecting the view result and to remove the filter (?...&field_b=xxx) in the query string?
updates: working code for states.
$field_state = array( 'visible' => array(':input[name="field_a"]'
=> array( array('value' => 'a') )), );
$form['field_a']['#states'] = $field_state
#states
functionality as you mentioned that The states is working fine. Sorry, we can't answer to your question if we do not have enough information about your functionality.