How to theme form elements in a custom field widget?
To add class to wrapper div of a form item you have to use the following theme function : theme_form_element

Copy and paste the entire theme_form_element function and rename the function with mytheme_form_element in your template.php and add your custom code like this (you may adjust to your own id) :

/* CUSTOM */
if (module_exists('mymodule')) {
  if (isset($element['#id']) &amp;&amp; ($element['#id'] == 'phone' || $element['#id'] == 'ext' || $element['#id'] == 'primary')) {
    $attributes['class'][] = 'my-class';
  }
}
/* END CUSTOM */


It's always difficult to change the structure of forms because it's in theme function and for that you have to add conditions.