function search_api_page_search_form_submit in Search API Pages 7
Form submission handler for search_api_page_search_form().
See also
user_login_form_validate()
File
- ./
search_api_page.module, line 582 - Generate search pages using Search API indexes.
Code
function search_api_page_search_form_submit(array $form, array &$form_state) {
$keys = trim($form_state['values']['keys_' . $form_state['values']['id']]);
$keys = strtr($keys, array(
"\\" => "\\\\",
'/' => "\\",
));
$form_state['redirect'] = $form_state['values']['base_' . $form_state['values']['id']] . '/' . $keys;
// To completely controll the redirect destination, we need to remove the
// 'destination' GET parameter, which would override our destination, if
// present.
unset($_GET['destination']);
}