You are here

function gss_search_form_submit in Google Site Search 6

Same name and namespace in other branches
  1. 7 gss.module \gss_search_form_submit()

Submit handler.

1 string reference to 'gss_search_form_submit'
gss_form_alter in ./gss.module
Adds custom submit handler for search form.

File

./gss.module, line 228

Code

function gss_search_form_submit($form, &$form_state) {
  $check = _gss_check();
  if ($check) {
    $form_id = $form_state['values']['form_id'];
    $keys = $form_state['values'][$form_id];
    if (!$keys) {
      $keys = $form_state['values']['processed_keys'];
    }
    $form_state['redirect'] = array(
      'search/gss/' . $keys,
    );
  }
}