How to add css classes to modal forms module
You can use #attributes to add some classes to the elements:

$form['name']['#attributes'] = array('class' =&gt; array('your-class'));


Will output something like this (class added to input element):

&lt;div class="form-item form-type-textfield form-item-name"&gt;
  &lt;label for="edit-name"&gt;Username &lt;span title="This field is required." class="form-required"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" maxlength="60" size="60" value="" name="name" id="edit-name" class="your-class form-text required"&gt;
  ...
&lt;/div&gt;