I want to remove the extra divs that get added like in the following example (user-register-form):
<div class="field-type-text field-name-field-phone-number field-widget-text-textfield form-wrapper" id="edit-profile-parent-field-phone-number"> <div id="profile-parent-field-phone-number-add-more-wrapper"> <div class="form-item form-type-textfield form-item-profile-parent-field-phone-number-und-0-value"> <label for="edit-profile-parent-field-phone-number-und-0-value">phone number <span class="form-required" title="This field is required.">*</span></label> <input class="text-full form-text required" type="text" id="edit-profile-parent-field-phone-number-und-0-value" name="profile_parent[field_phone_number][und][value]" value="" size="60" maxlength="255" /> </div> </div> </div>
I already did YOUR_THEME_form and YOUR_THEME_form_element in template.php to get rid of extra divs. But this only works for the standard fields of a form it seems.
I am using profile2 and profile2_regpath modules and it seems as if they add themselves extra divs for the fields that are specific to the profile fields. But I can't figure out how to overwrite this behavior.
Any help or hint appreciated.
And just in case it is already written somewhere: I used the search function and could only find the standard solution for normal fields. Nothing specific to profile2 module.
Oh and some details: I'm using Drupal 7. If anything else is needed, please tell me.
Thank you, best regards.