You are here

30 July 2013

This example shows how to alter filter in views exposed filters using form_alter in Drupal 7.

Source code viewer
  1. function HOOK_form_views_exposed_form_alter(&$form, &$form_state, $form_id) {
  2. if ($form_state['view']->name == 'VIEW_MACHINE_NAME') {
  3. $form['body']['#attributes']['class'][] = 'element-hidden';
  4. }
  5. }
Programming Language: PHP