Copy link to clipboard
Copied
Using Adobe Acrobat Pro - I am creating a form that has 6 different sections. I have a dropdown field with the option to choose either PASS or FAIL in each section. I looking for way to show a hidden text field only if the option PASS is selected in all 6 dropdown fields. Is this possible? Need help with javascript if so. Thanks!
Let's say your dropdown fields are named "Dropdown1" to "Dropdown6", as custom calculation script of text field you wish to show/hide use this:
var count = 0;
for(var i=1; i<=6; i++){
var f = this.getField("Dropdown"+i).valueAsString;
if(f === "PASS")count++;}
event.target.display = (count == 6) ? display.visible : display.hidden;
Copy link to clipboard
Copied
Let's say your dropdown fields are named "Dropdown1" to "Dropdown6", as custom calculation script of text field you wish to show/hide use this:
var count = 0;
for(var i=1; i<=6; i++){
var f = this.getField("Dropdown"+i).valueAsString;
if(f === "PASS")count++;}
event.target.display = (count == 6) ? display.visible : display.hidden;
Copy link to clipboard
Copied
That worked perfectly! Thank you so much for your help! I have been reading through threads all day trying to find something that would work, with no luck. I've seen your helpful replies on so many of these and was secretly hoping you would reply to mine lol! Again, thank you so so so much for the help! Truly appreciate it!