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

Question

Question

Laserfiche Forms - change background color and text color for read only drop down field based on value selected

asked on August 17, 2021 Show version history

I am working on two Laserfiche Forms. The first form is completed by the initiator who then submits it to the reviewer. As a next step, a new form is launched that contains the fields completed by the initiator showing in read only mode as well as other fields that should be completed by the reviewer.

In the form completed by the reviewer, I want to change the background color and text color of the read only drop down fields (that were completed by the initiator) without affecting other fields. The change will depend on the value selected in the fields. For example:

 

  • If drop field value is" Yes" then the background color should be green and the text color should be bold black.
  • If drop down field value is "No" then the background color should be dark red and the text color should be bold white.
  • If drop down field value is "In-Progress" then the background color should be orange and the text color should be bold black.
  • If drop down field is "Not Applicable" then the background color should be blue and the text color should be bold black.

 

How can I achieve this? Thank you.

 

Sincerely,

 

Wissam

0 0

Replies

replied on August 18, 2021

Any help would be appreciated.

0 0
replied on August 18, 2021

I would define a class in CSS for each color combination you wish to use.  In Javascript retrieve the value from the field and then use an IF statement to do a jquery addClass method for the desired color class.

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

Sign in to reply to this post.