You are here

function google_submit_redirect in Google Custom Search Engine 6

Redirect form submission to URL with query parameters.

1 string reference to 'google_submit_redirect'
google_form_alter in ./google.module
Implementation of hook_form_alter().

File

./google.module, line 58
Integrates Google Custom Search Engine with the Drupal core search API.

Code

function google_submit_redirect($form, &$form_state) {
  $keys = $form_state['values']['processed_keys'];
  $sitesearch = isset($form_state['values']['sitesearch']) ? $form_state['values']['sitesearch'] : NULL;
  $form_state['redirect'] = array(
    'search/google/' . $keys,
    google_build_query($keys, $sitesearch),
  );
}