Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding Subform to Drop Down List

Avatar

Level 1

I am trying to add subforms to display on selection of a drop down list. I cannot get it to work.  Please can someone tell me how to or help me do this?  I cannot seem to connect the subforms to the drop down.

2 Replies

Avatar

Level 7

If you mean you want the subforms to appear if a certain item is selected from a drop down list then you just have to make sure the items in your drop down list have values (you do this under Object > Binding > Specify Item Values) and then you can script the subform to appear (using .presense) if the value of  the drop down list matches the option you want on the exit event of the list.

Avatar

Level 5


seconding to earlier post,

Lets say dropwdown items are item1, item2, item3 etc

in the dropdown change event, write

if (xfa.event.newText == "item1")

{

subform1.presence = "visible";  //try to give the exact path for subform1 if it doesnot refer here like xfa.form.Page1.subform1 ..

subform2.presence = "hidden"; //optional to hider other subforms if you dont want to show them

}

if (xfa.event.newText == "item2")

{

subform2.presence = "visible";

subform1.presence = "hidden"; //optional to hider other subforms if you dont want to show them

}

hope this helps.

kc