Overwriting the default search box text in Drupal 7

This code goes in template.php and replaces the text on the default search box:

function themename_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'search_block_form') {
$form['actions']['submit']['#value'] = t('Search');
}
}

Leave a Reply