Alter markup around a webform 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 &lt;form class=""/&gt;.
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!
Have you tried theme_form_element ? 


  Returns HTML for a form element.


This hook is used to alter the thme of form element in Drupal. 

Check theme_field as well. 

How to theme form element in Drupal 7