solutiondrop
9/9/2015 - 2:54 PM

How to add css class to form fields From http://drupal.stackexchange.com/questions/134035/how-to-add-css-class-to-these-form-fields

foreach($form as $form_elem){
if($form-elem['#type']=='textfield'){
    $form[$form_elem]['#attributes']['class'][] = 'myclass';
   }
}