Easily theming Form Fields - How to get minimum HTML required for form field in Drupal 7 I'm using my own templates to modify forms, i.e. user registration form. In my custom template, I call drupal_render($form['field_email']); to get output for a text input used for taking user's Email.

However, this function returns so many outputs (including a Label which definitely I don't want, and a lot of divs) that break my design. What I require is a single &lt;input name = "appropriate-name" /&gt; but I'm getting:

&lt;div class="field-type-email field-name-field-user-email field-widget-email-textfield form-wrapper" id="edit-field-user-email"&gt;&lt;div id="field-user-email-add-more-wrapper"&gt;&lt;div class="text-full-wrapper"&gt;&lt;div class="form-item form-type-textfield form-item-field-user-email-und-0-email"&gt;
  &lt;label for="edit-field-user-email-und-0-email"&gt;Email &lt;span class="form-required" title="This field is required."&gt;*&lt;/span&gt;&lt;/label&gt;
 &lt;input type="text" id="edit-field-user-email-und-0-email" name="field_user_email[und][0][email]" value="" size="60" maxlength="128" class="form-text required" /&gt;


A lot of HTML! 

Is there a way to get minimum HTML required for a form input field to work properly? 

Perhaps, I may end up with editing the #theme property for this field, to specify a custom theme function. But That's a lot of work to do, I think. Besides, I have many other fields for which I may need to write custom theme functions to get simple HTML for the input. Is there a quick way to get minimum HTML for a form field?
I can't advise that you remove the labels as your website will instantly become inaccessible and fall foul of disability discrimination guidelines.

That being said, you can override the output for all form elements by implementing an override of the theme_form_element function. The easiest thing to do would be to copy that function in its entirety into a function in your site's theme called MYTHEME_form_element(&amp;$variables), and then step through the code trimming out the elements that you don't want to be output.