I would very much like to be able to insert HTML into labels. Currently, CCK overrides my < and > with &lt; and &gt;. I manage a website with a scientific background, and need to have superscript and subscript. ^ and _ look very unprofessional. I did some Google searching and came up with no way to do this.

If anyone has an idea or workaround (or even a hack!) it would be appreciated.

Comments

gagarine’s picture

Category: feature » support
Priority: Normal » Minor

You can certenly do that with the theme system.

crossblades’s picture

Can you give any details on that gagarine? I have the same problem and can't seem to work it out.

yched’s picture

Status: Active » Fixed

Right, HTML is not allowed in field labels.
If you want to change how your field gets displayed in nodes (including the label), you can override it's field template.
For more information, see the 'Theming CCK data in nodes' section in CCK's help pages (available by installing the advanced_help module).
This won't affect the label as display on the form, though. No way to do that, unfortunately.

crossblades’s picture

In my case the look of the labels is mostly ok and doesn't require any changes to the template. It's the content of the label, I'm working on a page where I often need to use fields with labels like "price for m2", and as stated above it looks very unprofessional to use m^2 in such cases.
Any ideas how to go around that bump? I thought of using some unusual character combination like #*# and then runninng javascript to correct this client side, but that seems a bit hideous..

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.