Change visibility of fields based on dropdown list selection
I have a pdf for use as a checklist for reviews. I opted to combine 3 different checklists, as many of the fields are the same between them. I'm trying to use a dropdown list to select the type of review the checklist is for, and when making the selection line items on the checklist will be covered with a black box if they don't apply. I have used the following code to successfully do this on a limited scale:
this.getField("Black2.5").display = event.value == "New" ? display.visible : display.hidden;But, this doesn't work anymore when I add the second review type to also cover that line item:
this.getField("Black2.5").display = event.value == "New" ? display.visible : display.hidden;
this.getField("Black2.5").display = event.value == "Revision" ? display.visible : display.hidden;Additionally, the third review option covers most items (not the one in the example above), and a majority of those don't work, even if I only put in the code for that option. For the other two options, just putting in the code for them individually works fine.
So, how can I write this so that it will work despite the option I choose?