Alter views exposed filter using any hook function I want to alter an exposed filter of a view to add a new field to the existing filter. I tried the same with hook_views_pre_view() and the new filter field added successfully. But after typing something to that autocomplete field, that field disappears. Means on the first page load, field displaying correctly but when AJAX starts it disappears. Also I tried with other hook functions like hook_views_pre_build and hook_views_pre_execute(). Can any one help me on this? Thanks.

function modulename_views_pre_view(&amp;$view) {
  if ($view-&gt;name == 'my_view_name') {
      $view_filters = $view-&gt;display_handler-&gt;get_option('filters');
      //Add new field
      $view_filters['new_field'] = array(
        'id' =&gt; 'new_field',
        ..
        ..
      );

     $view-&gt;display_handler-&gt;override_option('filters', $view_filters);

  }
}
This will be work by using hook_views_default_views_alter function. This function should be defined in MODULE_NAME/views/MODULE_NAME.views.inc file. Need to include this file on .info file as files[] = views/MODULE_NAME.views.inc.

function MODULE_NAME_views_default_views_alter(&amp;$views) {
        if (array_key_exists('MY_VIEW_NAME', $views)) {
          $options = array(
          0 =&gt; 'Blocked',
          1 =&gt; 'Active',
          ); 
          $display = $views['MY_VIEW_NAME']-&gt;display['MY_VIEW_PAGE'];
          $display-&gt;display_options['filters']['field_status']['id'] = 'field_status';
          $display-&gt;display_options['filters']['field_status']['table'] = 'field_data_field_status';
          $display-&gt;display_options['filters']['field_status']['field'] = 'field_status';
          $display-&gt;display_options['filters']['field_status']['value'] = $options;
          $display-&gt;display_options['filters']['field_status']['exposed'] = TRUE;
          $display-&gt;display_options['filters']['field_status']['expose']['operator_id'] = 'field_status_value';
          $display-&gt;display_options['filters']['field_status']['expose']['label'] = 'Status';
          $display-&gt;display_options['filters']['field_status']['expose']['operator'] = 'field_status_value';
          $display-&gt;display_options['filters']['field_status']['expose']['identifier'] = 'field_status';
          $views['MY_VIEW_NAME']-&gt;display['MY_VIEW_PAGE'] = $display;
          }
    }


Hope this may helpful for anyone who are facing same issue.