| 5 search.module | search_box($form_id) |
| 6 search.module | search_box(&$form_state, $form_id) |
| 7 search.module | search_box($form, &$form_state, $form_id) |
| 8 search.module | search_box($form, &$form_state, $form_id) |
Form builder; Output a search form for the search block and the theme's search box.
See also
Related topics
3 string references to 'search_box'
File
- modules/
search/ search.module, line 1063 - Enables site-wide keyword searching.
Code
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;
}
Login or register to post comments
Comments
For reference, to print out
For reference, to print out this form on any page within a template or module, just use:
<?phpprint drupal_get_form('search_block_form');
?>