I'd like to be able to set the field label as an <h2>. How can I do?

I'm editing the features definition for a field collection directly so if it's possible to set it in there that would be super-handy!

1 Answer 1


One can provide a field.tpl.php file within the theme.

You can copy the existing field.tpl.php file from /modules/field/theme (which btw is just auxilliary and not used by Drupal) into the theme's directory and replace the line:

<div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>:&nbsp;</div>


<div class="field-label"<?php print $title_attributes; ?>><h2><?php print $label ?>:&nbsp;</h2></div>

or something.

Not the answer you're looking for? Browse other questions tagged or ask your own question.