You are viewing limited content. For full access, please sign in.

Question

Question

Change background colour of item in collection based on a calculated field

asked on August 17, 2021

Hi LF Collective!

I am trying to change the background colour of a collection of fields based on a calculated field within that collection.  The collection has 5 fields (Risk Assessment) and based on the Risk Calculation, I would like the background colour to change.  

In theory, there could be multiple times in the collection with different coloured backgrounds.  Is this possible (with Java and CSS)?  

Thanks,

Anthony

0 0

Replies

replied on August 17, 2021

My favorite way is with the jquery methods for adding and removing classes, where the class defines the background color.

https://api.jquery.com/addclass/

https://api.jquery.com/removeclass/

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.