I tried to implement hook_form_alter
in order to pass default value to Simple hierarhical select views exposed filter.
function mymodule_form_alter(&$form, &$form_state, $form_id) {
$tid = get_tid_from_termalias (arg(1)); // here I get tid
$form_state['input']['field_sity1_tid'] = (!empty($tid)) ? $tid : 'All';
$form_state['field_sity1_tid']['#value'] = (!empty($tid)) ? $tid : 'All';
$form['field_sity1_tid']['#default_value'] = (!empty($tid)) ? $tid : 'All';
$form['field_sity1_tid']['#value'] = (!empty($tid)) ? $tid : 'All';
}
I see that shs.js creates 2 selects, one hidden and one shown. My code changes only the value in the hidden select while second select always remains 'All'. How to change the visible select's default value?