function simple_gse_search_form in Simple Google Custom Search Engine 7
Search form. Used as the content for the custom block.
1 string reference to 'simple_gse_search_form'
- simple_gse_search_block_view in ./
simple_gse_search.module - Implements hook_block_view().
File
- ./
simple_gse_search.module, line 76 - Module file for Simple GSE Search
Code
function simple_gse_search_form($form, &$form_state, $default_value = '') {
$form = array();
$form['s'] = array(
'#type' => 'textfield',
'#title' => t('Search'),
'#default_value' => $default_value,
'#attributes' => array(
'placeholder' => 'Search site...',
'class' => array(
'SearchForm-input',
),
),
'#theme_wrappers' => array(),
'#size' => NULL,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'go',
'#name' => '',
'#attributes' => array(
'class' => array(
'SearchForm-submit',
),
),
);
$form['#attributes'] = array(
'class' => array(
'SearchForm',
),
);
$form['#action'] = url('search');
$form['#method'] = 'get';
$form['#pre_render'][] = 'simple_gse_search_form_pre_render';
return $form;
}