This example shows how to alter filter in views exposed filters using form_alter in Drupal 7.
Source code viewer
function HOOK_form_views_exposed_form_alter(&$form, &$form_state, $form_id) { if ($form_state['view']->name == 'VIEW_MACHINE_NAME') { $form['body']['#attributes']['class'][] = 'element-hidden'; } }Programming Language: PHP