On this page
function search_form_submit
search_form_submit($form, &$form_state)
Process a search form submission.
File
- modules/search/search.pages.inc, line 150
- User page callbacks for the search module.
Code
function search_form_submit($form, &$form_state) {
$keys = $form_state['values']['processed_keys'];
if ($keys == '') {
form_set_error('keys', t('Please enter some keywords.'));
// Fall through to the form redirect.
}
$form_state['redirect'] = $form_state['action'] . '/' . $keys;
}
© 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/modules!search!search.pages.inc/function/search_form_submit/7.x