Guest User

Untitled

a guest
Mar 24th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. function THEME_form_search_block_form_alter(&$form, &$form_state, $form_id) {
  2. $form['#attributes']['class'][] = 'form-inline ';
  3.  
  4. }
  5.  
  6. /*
  7. * Implement hook_form_alter()
  8. */
  9. function custom_form_search_block_form_alter(&$form, DrupalCoreFormFormStateInterface $form_state, $form_id) {
  10. $form['#attributes']['class'][] = 'test';
  11. }
  12.  
  13. function THEMENAME_preprocess_form(&$vars) {
  14. $vars['attributes']['class'][] = 'form-inline ';
  15. }
  16.  
  17. function YOURTHEMENAME_form_search_block_form_alter(&$form, &$form_state, $form_id) {
  18. $form['#attributes']['class'] = myclass; // Change the class name.
Add Comment
Please, Sign In to add comment