1.20.x views.module | views_exposed_form_submit(&$form, &$form_state) |
Submit handler for exposed filters
File
- modules/
views/ views.module, line 1770 - Primarily Backdrop hooks and global API functions to manipulate views.
Code
function views_exposed_form_submit(&$form, &$form_state) {
foreach (array('field', 'filter') as $type) {
$handlers = &$form_state['view']->$type;
foreach ($handlers as $key => $info) {
$handlers[$key]->exposed_submit($form, $form_state);
}
}
$form_state['view']->exposed_data = $form_state['values'];
$form_state['view']->exposed_raw_input = array();
$exclude = array('q', 'submit', 'form_build_id', 'form_id', 'form_token', 'exposed_form_plugin', '', 'reset');
$exposed_form_plugin = $form_state['exposed_form_plugin'];
$exposed_form_plugin->exposed_form_submit($form, $form_state, $exclude);
foreach ($form_state['values'] as $key => $value) {
if (!in_array($key, $exclude)) {
$form_state['view']->exposed_raw_input[$key] = $value;
}
}
}