Add class to submit button of a standard search form

Public
</> CopyGet raw version
php
  1. /**
  2.  * Implements hook_form_search_form_alter().
  3.  */
  4. function THEME_OR_MODULE_NAME_form_search_form_alter(&$form, &$form_state, $form_id) {
  5. $form['basic']['submit']['#attributes']['class'][] = 'button';
  6. }