Copy link to clipboard
Copied
I am using a combo box that displays a text field on a selection. I need text as well as a checkbox to appear. When I put a checkbox in there, it remains when the text field disappears. How can I make the checkbox appear/disappear with text in a text field???
Copy link to clipboard
Copied
You have text field and checkbox field, and you want both to show/hide depending on selection from dropdown field?
What is selection in a dropdown field, and what are the names of the text field and checkbox field?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
What selection should show/hide fields?
Do you want to show/hide Textfield1 and all 3 checkboxes?
JavaScript is case sensitive so when you write Box1 and box2 for field names it's not the same.
The same for dropdown choices, if you write 'leadership' and your actual choice is 'Leadership' the script wouldn't work.
Here is an example script by using 'leadership' selection to show all fields and hide them when 'leadership' is not selected (put script in dropdown field under 'Validate' tab):
if(event.value == "leadership") {
this.getField("Textfield1").display = display.visible;
this.getField("Box1").display = display.visible;
this.getField("Box2").display = display.visible;
this.getField("Box3").display = display.visible;}
else {
this.getField("Textfield1").display = display.hidden;
this.getField("Box1").display = display.hidden;
this.getField("Box2").display = display.hidden;
this.getField("Box3").display = display.hidden;}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now