You are here

function google_cse_sitesearch_form in Google Custom Search Engine 7.2

Same name and namespace in other branches
  1. 6 google_cse.module \google_cse_sitesearch_form()
  2. 7 google_cse.module \google_cse_sitesearch_form()

Returns SiteSearch options form item.

3 calls to google_cse_sitesearch_form()
google_cse_form_search_block_form_alter in ./google_cse.module
Adds custom submit handler for search block form.
google_cse_form_search_form_alter in ./google_cse.module
Adds custom submit handler for search form.
google_cse_results_searchbox_form in ./google_cse.theme.inc
Form builder for the searchbox forms.
1 string reference to 'google_cse_sitesearch_form'
google_cse_admin_settings in ./google_cse.admin.inc
Admin settings page for the CSE.

File

./google_cse.module, line 265
Display a Google Custom Search Engine (CSE) on your site.

Code

function google_cse_sitesearch_form(&$form) {
  if ($options = google_cse_sitesearch_options()) {
    $form['sitesearch'] = array(
      '#type' => variable_get('google_cse_sitesearch_form', 'radios'),
      '#options' => $options,
      '#default_value' => google_cse_sitesearch_default(),
    );
    if ($form['sitesearch']['#type'] == 'select' && isset($form['sa'])) {
      $form['sa']['#weight'] = 10;
    }
  }
}