+ Start a Discussion

Simple S-Control - display custom field in red

I need some help on creating a simple s-control field that I can use to display a particular field on a page layout in red (and possibly bold). 
Hello sf_john,

If you want to change the color of the field label, and you have room, you can add the HTML attributes to the label.  If you wanted to have a field with italics then you would put <i>Field Name</i> in the field label field.  I am not aware of any way that will display the field value in anything but the standard attributes.  They are controlled by the CSS closest to the data so I don't think it is possible.

Others may know of a way to do this.

That seems to work, although not the best solution, especially if the field label is long.  Also, it makes the label name a bit strange for mail merge templates.

Anyone know how to do this in an s-control?

Execute EZSAASExecute EZSAAS
write an "inline" S-control - type=HTML, which does everything on the load i.e. <body onload="yourFn()". In this function yourFn() - query the object using AJAX api and get the field value and label, since the output is HTML, you can display in any color you want. Send me a note if you need sample code execute<at>ezsaas<dot>com