Expand my Community achievements bar.

SOLVED

Checkbox help

Avatar

Level 2

Hello,

 

I am using LiveCycle ES 4 and am stuck with something and am seeking guidance.

 

Let's say I have 2 forms. Form #1 has Family name, Given name, Date of Birth. Form #2 has Family name, Given name, Date of birth, Gender, Nationality. The fields in these forms are read-only and are populated from a main page that has ALL of the fields.

 

Now, I have two check boxes (Form #1 and Form #2) to highlight the pertinent fields in RED. I have a main page that has all of the fields mentioned above. What I would like to do is as follows:

 

If the user checks form 1, I would like the pertinent fields to be highlighted in the main page. In this case I just changed the border to red. If unchecked, it goes back to black. Eg. Surname, Given name, DOB are highlighted. If form 2 is checked, then those fields get highlighted. Since the forms share some but not all of the fields, I would like it so if the user checks form 1 and 2 but then unchecks form 2 then only the non shared fields revert back to black. The issue I am having is that if both forms are checked but then form 2 is unchecked, it also reverts back to black the fields Surname, Given name, DOB. I have been using IF statements but can't seem to accomplish what I want. I hope this makes sense.

 

Form 1

 - Surname

 - Given name

 - DOB

 

Form 2 

 - Surname

 - Given name

 - DOB

 - Gender

 - Nationality

If you uncheck the form 2 box only Gender and Nationality should revert back to black because Form #1 checkbox is still checked. In this case Surname, Given name, DOB should remain red.

 

Thank you for your help

L

1 Accepted Solution

Avatar

Correct answer by
Employee
2 Replies

Avatar

Correct answer by
Employee

Avatar

Level 2
Thank you very much Kosta. This is exactly what I was looking for. I was afraid it would have involved many IF statements. In reality I have 10 forms with 60 fields. Each form that is checked will highlight the appropriate fields. This will definitely take a while but I have already begun making functions to help reduce the code. Thanks again