How to override exposed filters view I have one form of exposed filters of view. I need to override few elements of that, like change options for select box dropdown and like that.

For that I have created view, and used hook_form_alter, but the changes are not reflecting.

My work:

function custom_module_form_alter($form, &amp;$form_state, $form_id) {  
    if ($form_id == 'views_exposed_form' &amp;&amp; $form['#id'] == 
         'views-exposed-form-advanced-search-page') {

         print_r($form['submit']);  //debug
         $form['submit']['#value'] = t('Search');
         print_r($form['submit']); //debug
    }
}


As shown above, to test, I am just trying to alter the label of submit button, and for debugging, I have added two print_f, statement, output of which are as follows:

First print_f():

Array ( [#name] =&gt; 
        [#type] =&gt; submit 
        [#value] =&gt; Apply 
        [#id] =&gt; edit-submit-advanced-search 
      ) 


Second print_f():

Array ( [#name] =&gt; 
        [#type] =&gt; submit 
        [#value] =&gt; Search
        [#id] =&gt; edit-submit-advanced-search 
     ) 


As shown, the label is changing, but it is not reflecting to the form.

Considering module weight, I have also tried giving more weight to my module tham views weight. But nothing changed.

Please suggest, if I am missing something.

-- Thanks for your time.
You have to pass the variable as reference. 

So the function would should be 

function custom_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {