Add CSS class to  element using webform and template file
I believe your edit is correct. You should add the class in a preprocessor function within template.php. 

A similar question and answer can be found here.