Posted by mayur.pimple on May 29, 2012 at 9:44am
Hi
I have use form alter function. I want add class attribute to submit button. How to apply class.
In Page there are 2 submit button. both are id is different.
Thanks
mayur
Hi
I have use form alter function. I want add class attribute to submit button. How to apply class.
In Page there are 2 submit button. both are id is different.
Thanks
mayur
Comments
Use attributes
You can use $form['submit']['#attributes']
$form['submit']['#attributes'] = array(
'class' => 'myclass',
);
URL
http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#attributes
thanks
It's Works