I have been trying to alter the markup generated by my webform. .
Example changes which I would like to do:
- Add the class "form-horizontal" to the classes under
<form class=""/>
. - Add the class "input-xxlarge" to each input field.
- Remove any markup generated by the webform module (e.g. form-item, webform-component, webform-component-textarea).
I've been trying to override these values with the help of Devel. Using webform-form-[nid].tpl.php
, I have the following line before I make any print statements:
$form['#attributes']['class']['0'] = 'form-horizontal';
The issue is that I can not alter the form classes. Any insight that can be shared would be highly appreciated!