Showing/Hiding multiple fields based on a checkbox is checked.
So, I have a form I am editing that someone else created. Using adobe Acrobat Pro DC. In this form I've got checkboxes. The first checkbox has javascript that I want to affect multiple fields - by showing or hiding them based on if the box is checked or not. For background, the box is called "Brkfst", is the first box in the form and if checked, two other fields should appear - 1st is basically a label for the second box. The first box is set to hidden by default and marked read only. Default is set to the label title I want to show. The second box is a text box for user input and is set to hidden.
The code I am trying to make work is in the actions under the Brkfst check box, and is set on the mouse up action, to run the following script:
var fieldHide = event.target.isBoxChecked(0)?display.visible:display.hidden;
this.getField("Expected Brkfst").display = fieldHide;
this.getField("BDeliver").dispay = fieldHide;
This code wasn't in the form when I got it, I put it there. This works for the first box as expected, but I can't get the second box "BDeliver" to show or hide based on the check. Am I missing something? Originally neither would work, so I tried to "start over" by renaming the fields (the names are very long) to something shorter. This worked to activate the first box "Expected Brkfst" but not the other. I am far from a JavaScript person, just a girl learning how to do this stuff on the fly so any help would be great!
