Skip to main content
Nintex Community Menu Bar
Question

Conditionally color background of division if value of field is true

  • July 11, 2024
  • 3 replies
  • 8 views

Forum|alt.badge.img+7

How do I conditionally color background of division if value of checkbox field (named agenda__c) is true?  Basically trying to highlight fields if the agenda checkbox is checked.

3 replies

Forum|alt.badge.img+10

Allison,

Would this post work for you?

https://community.skuid.com/t/change-background-color-of-an-edit-field

Thanks,

Bill


Forum|alt.badge.img+7
  • Author
  • July 11, 2024

No, I get an error on the highlighted part


Forum|alt.badge.img+8

It looks like you’re mixing CSS and Javascript.  CSS (the highlighted section) needs to be added separately, like through the CSS resource on the page or externally through a static resource or other location.  All you should need to do in script is add the class.

Personally I try to avoid business logic in script and prefer to use parameters and to handle situations where data influences the UI.  This post might help out for you.

https://community.skuid.com/t/css-for-template-fields