I have an exposed filter, and instead of having the button to activate it have an 'apply' label, I'd like to change it to something else. How can I do that?

This question is regarding D6. However just fyi, in Drupal 7 you can change the label much more easily by going to "Advanced" in your view edit page, then in the exposed form settings you can change the button label as well as other look and feed settings.

You can change the submit button label using hook_form_FORM_ID_alter in a custom module. For example, to change "Apply" to "Search" add this function to example.module:

function example_form_views_exposed_form_alter(&$form, &$form_state) {
  $form['submit']['#value'] = t('Search');
}

You can use the Better Exposed Filters module. gives you greater control over the rendering of exposed filters.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.