Change “apply” button text in Drupal Views exposed filters
When you want the user to search, the “apply” text can be confusing in a Drupal views exposed filter button.
To change this, create your own custom module and add the function below. Note that our module is named “digitalstax_customizations” and we wanted the change applied to a view named “admin_dashboard.”
function digitalstax_customizations_form_alter(&$form, $form_state, $form_id) {
if($form_state['view']->name == 'admin_dashboard') {
$form['submit']['#value'] = t('Search');
}
}
| Print article | This entry was posted by Raymond on April 18, 2010 at 5:38 am, and is filed under Drupal, Views. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |
Comments are closed.