Hi, sorry if someone has already posted this question:
I am creating a PDF using Adobe Designer and I am having some trouble with the subforms.
I have a dropdown text menu titled "Number of Dependents" with options "1", "2", and "3". Depending on which option I choose, I would like a certain subform (out of 3) to be displayed.
As an example:
If hit "Number of Dependents" and select "1", I want subform1 to be displayed. If I select "2", I want subform1 and subform 2 to be displayed.
If I select "3", I want subform1, subform2, and subform3 to be displayed
drop-down lists use the change event to read the users value and the example here uses relative paths where "this" is the drop-down list.
this example uses client side JavaScript on a dynamic form:
TopmostSubform.Page1.delphiProduct::change - (JavaScript, client)
if (this.xfa.event.change == this.xfa.event.change == "Delphi Multi-Property") {
TopmostSubform.Page2.salesHomeIntro.presence = "invisible";
TopmostSubform.Page2.SalesManagerProductivity.presence = "invisible";
TopmostSubform.Page2.salesHomeEmpty.presence = "visible";
}
else if (this.xfa.event.change == "Delphi Single-Property") {
TopmostSubform.Page2.salesHomeIntro.presence = "visible";
TopmostSubform.Page2.SalesManagerProductivity.presence = "visible";
TopmostSubform.Page2.salesHomeEmpty.presence = "invisible";
}
else {
TopmostSubform.Page2.SalesManagerProductivity.presence = "visible";
}
and on each subform, in the Object palette, select "hidden" (for flowed forms) or invisible to initially have the subforms hidden.
make sure to set File > Form Properties > Defaults and set JavaScript for Default Language and Default Run At to Client (if that meets your needs)the do File As and select Adobe Dynamic XML Form
you might already have done this, I just found the process to be a bit convaluted and circuitous