Background color of individual text fields

CrystalFrontier 03 Aug, 2018
Dear all

Back in the days (CF4), if you wanted to change the background color of just one text field (e.g. to highlight in green the sum total of fees incurred), you just entered a custom code before said field (for orientation) in the 'Preview' section with the following content:

<style>
#fees_acc { background-color:#A9D788; }
</style>

...with fees_acc being the field ID. --> Success!

Now, in either CF 5 or 6 there is no response, and the same code actually appears on the form itself, that is until I switch to Pure Code --> Yes. But still nothing.

What am I doing wrong?

Thanks for any help on this minor luxury item,
Christopher
GreyHead 03 Aug, 2018
Hi Christopher,

You can add the CSS:
+ for CFv5 in a Load CSS action in the Setup tab
+ for CFv6 in a CSS element from the Custom group in the Designer tab

Bob
CrystalFrontier 06 Aug, 2018
Answer
Hello Bob
Okay, got it working:

#total {
background-color: yellow;
}

Thanks!
Christopher
healyhatman 06 Aug, 2018
Or for CF6 just add the following to the Additional Attributes setting
style:background-color:yellow
CrystalFrontier 06 Aug, 2018
Many thanks! Sadly, I can't use v6 because I'd like to export to Google Spreadsheets😉
This topic is locked and no more replies can be posted.