function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sf_johnsf_john 

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). 
 
Thanks!
TCAdminTCAdmin
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.
sf_johnsf_john

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