I want to customize the default value for a filter in view through some custom code. I have tried the below answer and its not working for me.
if ($form['#id'] == 'MY_EXPOSED_FORM_ID') {
// Modifications go here.
// example: (change the field name to yours)
// $form['field_adv_cat_1_tid']['#default_value'] = 'All';
}
How to change views exposed filter default value
And I tried these settings also.
$form_state['input']['field_program_tid'] = '44';
$view->filter['field_program_tid']->value = "44";
$view->exposed_input['field_program_tid'] = "44";
Anyone help me in this?