function views_form_views_exposed_form_alter

views_form_views_exposed_form_alter(&$form, FormStateInterface $form_state)

Implements hook_form_alter() for the exposed form.

Since the exposed form is a GET form, we don't want it to send a wide variety of information.

File

core/modules/views/views.module, line 643
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) {
  $form['form_build_id']['#access'] = FALSE;
  $form['form_token']['#access'] = FALSE;
  $form['form_id']['#access'] = FALSE;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!views!views.module/function/views_form_views_exposed_form_alter/8.1.x