Long Drop Down List Show/Hide Field
I am creating a PDF Form in Acrobat Pro DC. I have a list of over 40 items that I want in a drop down list that, when chosen, causes specific fields to appear or disappear. I am already using the code shown below, but the validation section of the drop down properties states that my validation code is too long and cuts me off at just over 1100 lines. Here are the questions that I can't find an answer to:
Is there a better way to: 1. create the drop down or 2. create the validation or 3. use a better form field option so that I can have this many items but still have it work in the file? Everything must be part of the PDF file itself with no outside data source. Maybe I'm just dreaming.
Here is what I've been using and it works great, but takes up too many lines of code once all 40 items are entered.
if (event.value == "Judge") {
this.getField("Murray").display = display.hidden;
this.getField("Hunn").display = display.hidden;
........ // (Remainder of items)
}
else if (event.value == "Murray") {
this.getField("Murray").display = display.visible;
this.getField("Hunn").display = display.hidden;
........ // (Remainder of items)
}
else (event.value == "Other") {
this.getField("Murray").display = display.hidden;
this.getField("Hunn").display = display.hidden;
........ // (Remainder of items)
}
Thoughts?
Todd
