search_box_form_submit

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

Process a block search form submission.

Related topics

Code

modules/search/search.module, line 1053

<?php
function search_box_form_submit($form_id, $form_values) {
  // The search form relies on control of the redirect destination for its
  // functionality, so we override any static destination set in the request,
  // for example by drupal_access_denied() or drupal_not_found()
  // (see http://drupal.org/node/292565).
  if (isset($_REQUEST['destination'])) {
    unset($_REQUEST['destination']);
  }
  if (isset($_REQUEST['edit']['destination'])) {
    unset($_REQUEST['edit']['destination']);
  }

  return 'search/node/'. trim($form_values[$form_id .'_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.