Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to make field label style bold. Currently I can do this
$content = '<b>' . $content. '</b>';
to make field content (only) bold. It would be useful, if I could use $label variable to do the same only to label.
Comments
Comment #1
milos.kroulik CreditAttribution: milos.kroulik commentedI found an unexpected workaround - I was able to set label as bold directly by setting field label to:
<b>[label]</b>
Should this be added to "gotchas" documentarion page?
Comment #2
vegansupreme CreditAttribution: vegansupreme commentedWhoa, yes this definitely should be added to documentation! There are at least a few other people out there that want to do this. You just add the tags right below the "Create a label" checkbox. This works in unformatted and table. I was even able to apply a class and theme it with CSS.
Comment #4
zarabatana CreditAttribution: zarabatana commentedNice suggestion.
It works perfectly.
Thanks
Comment #5
Kris77 CreditAttribution: Kris77 commented@milos.kroulik in which part of views I can insert
<b>[label]</b>
?Thanks