PDA

View Full Version : TextField label with multiple colors



e3133d3
17 Jul 2012, 6:08 AM
Is there a way to set TextField label to have multiple colors?

For example:

Name:*

e3133d3
17 Jul 2012, 6:15 AM
I managed to do it using:
field.setLabelSeparator(":<font color=\"red\">*</font>");

estesbubba
18 Jul 2012, 7:03 AM
Better way would be to move it to CSS. I try to never put CSS in code.



.x-field-required label::after, .x-field-required .x-form-label::after {
content: "*";
display: inline;
color: red;
}