Skip to main content

Drupal 6.x - Change Search Button Submit Text

**UPDATED**
There is a module to do this which works much better and add some other features
http://drupal.org/project/custom_search

**Old Post**
This is not a recommended Drupal solution as we have to make a change in the core module, but I have found no other way of accomplishing this, so here we go. It is actually very simple, you only have to change one line of code:

open the following file in your favorite text editor ( Not a word processor as that may try to format the text)
modules/search/search.module

change 'Search' to 'whatever you want it to say' in line 1070:

<?php

$form
['submit'] = array('#type' => 'submit', '#value' => t('your new term'));
?>

Thats all, upload the file, and don't forget to empty the cache if it doesn't show up right away.

Comments

#1 The problem with this

The problem with this approach is that when you update Drupal, you will overwrite this change and it's lost.

A sustainable way is in the Drupal handbooks. http://drupal.org/node/45295

#2 Very True, Thank you

There is also a great module available to do this now.
http://drupal.org/project/custom_search

Even lets you upload an image for the submit button