Copy link to clipboard
Copied
Hello, I need help with making certain check boxes visible/hidden based on a drop down selection. As you can see from the screenshot, I only want the check boxes on the side to be visible to mark off if I choose a value in the Account Type field since not all check boxes will be needed. Please help! this is the last thing I need to complete this form 🙂
Copy link to clipboard
Copied
There was an error in a script I posted, it's fixed now.
You can add another choice like this:
if(event.value == "Choice1"){
this.getField("Checkbox1").display = display.visible;
this.getField("Checkbox2").display = display.visible;
this.getField("Checkbox3").display = display.visible;
this.getField("Checkbox4").display = display.hidden;
this.getField("Checkbox5").display = display.hidden;}
else if(event.value == "Choice2"){
this.getField("Checkbox1").display = display.visible;
this.getField("Checkbox2").display = display.visible;
this.getField("Checkbox3").display = display.hidden;
this.getField("Checkbox4").display = display.hidden;
this.getField("Checkbox5").display = display.hidden;}
Copy link to clipboard
Copied
You can use 'display' property and set checkboxes to 'visible' or hidden' depending on dropdown choices, something like this:
if(event.value == "Choice1"){
this.getField("Checkbox1").display = display.visible;
this.getField("Checkbox2").display = display.visible;
this.getField("Checkbox3").display = display.visible;
this.getField("Checkbox4").display = display.hidden;
this.getField("Checkbox5").display = display.hidden;}
Copy link to clipboard
Copied
Thank you Nesa! How would I go on with the other choices? My issue now is that the other selections from the drop down is no longer generating nor will it let me select the other choices from the list. It seems like it's stuck. Can you show me an example of adding Choice2 as well? Just to make sure, this script should be in the custom calcuation script, correct?
Copy link to clipboard
Copied
There was an error in a script I posted, it's fixed now.
You can add another choice like this:
if(event.value == "Choice1"){
this.getField("Checkbox1").display = display.visible;
this.getField("Checkbox2").display = display.visible;
this.getField("Checkbox3").display = display.visible;
this.getField("Checkbox4").display = display.hidden;
this.getField("Checkbox5").display = display.hidden;}
else if(event.value == "Choice2"){
this.getField("Checkbox1").display = display.visible;
this.getField("Checkbox2").display = display.visible;
this.getField("Checkbox3").display = display.hidden;
this.getField("Checkbox4").display = display.hidden;
this.getField("Checkbox5").display = display.hidden;}
Copy link to clipboard
Copied
You're the best, Nesa. Thanks a million!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more