i am trying to ad an extra search box to search_by_page here is the function:
function search_by_page_form( &$form_state, $keys = '' ) {
$form = array(
'#action' => url( 'search_pages' ),
'#attributes' => array('class' => 'search-by-page-form'),
'#method' => 'post',
);
$fieldlabel = variable_get( 'search_by_page_field_label', t( 'Search for' ));
$buttonlabel = variable_get( 'search_by_page_button_label', t( 'Search'));
if (module_exists('i18nstrings')) {
$fieldlabel = tt('search_by_page:search_form:field_label', $fieldlabel);
$buttonlabel = tt('search_by_page:search_form:button_label', $buttonlabel);
}
$form['keys'] = array(
'#type' => 'textfield',
'#title' => $fieldlabel,
'#default_value' => $keys,
'#size' => 30,
'#maxlength' => 255,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => $buttonlabel,
);
return $form;
}
and i added this
function search_by_page_form( &$form_state, $keys = '' ) {
$form = array(
'#action' => url( 'search_pages' ),
'#attributes' => array('class' => 'search-by-page-form'),
'#method' => 'post',
);
$fieldlabel = variable_get( 'search_by_page_field_label', t( 'Search for' ));
$buttonlabel = variable_get( 'search_by_page_button_label', t( 'Search'));
if (module_exists('i18nstrings')) {
$fieldlabel = tt('search_by_page:search_form:field_label', $fieldlabel);
$buttonlabel = tt('search_by_page:search_form:button_label', $buttonlabel);
}
$form['keys'] = array(
'#type' => 'textfield',
'#title' => $fieldlabel,
'#default_value' => $keys,
'#size' => 30,
'#maxlength' => 255,
);
$form[extrabox]['keys'] = array(
'#type' => 'textfield',
'#title' => t('Search'),
'#default_value' => $keys,
'#size' => 30,
'#maxlength' => 255,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => $buttonlabel,
);
return $form;
}
it gives me an extra box but it is not included in the search???