search_form_submit

Versions
4.7 – 5
search_form_submit($form_id, $form_values)
6 – 7
search_form_submit($form, &$form_state)

Process a search form submission.

Related topics

Code

modules/search.module, line 1014

<?php
function search_form_submit($form_id, $form_values) {
  $keys = $form_values['processed_keys'];
  if ($keys == '') {
    form_set_error('keys', t('Please enter some keywords.'));
    // Fall through to the drupal_goto() call.
  }

  $type = $form_values['module'] ? $form_values['module'] : 'node';
  return 'search/'. $type .'/'. $keys;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.