function search_box

Same name and namespace in other branches
  1. 7.x drupal-7.x/modules/search/search.module \search_box()

Form builder; Output a search form for the search block and the theme's search box.

See also

search_box_form_submit()

search-block-form.tpl.php

Related topics

3 string references to 'search_box'
search_forms in drupal-6.x/modules/search/search.module
template_preprocess_maintenance_page in drupal-6.x/includes/theme.maintenance.inc
The variables generated here is a mirror of template_preprocess_page(). This preprocessor will run it's course when theme_maintenance_page() is invoked. It is also used in theme_install_page() and theme_update_page() to keep all the variables…
template_preprocess_page in drupal-6.x/includes/theme.inc
Process variables for page.tpl.php

Archivo

drupal-6.x/modules/search/search.module, line 1063
Enables site-wide keyword searching.

Código

function search_box(&$form_state, $form_id) {
  $form[$form_id] = array(
    '#title' => t('Search this site'),
    '#type' => 'textfield',
    '#size' => 15,
    '#default_value' => '',
    '#attributes' => array('title' => t('Enter the terms you wish to search for.')),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Search'),
  );
  $form['#submit'][] = 'search_box_form_submit';

  return $form;
}