Copy link to clipboard
Copied
I know I have seen this post but nothing is as specific as I need it to be and I know I am doing something wrong.
I made this form in Word and transferred it over to Acrobat Pro DC
In the drop-down box (Emergency Landing / Crash) I have 3 options. When I pick one, I am trying to get a new fillable PDF form to appear. I have each form needed on the same PDF page.
This is one of the forms that I need to "appear" when I click one of the options:
So I've Inserted the JS into the Validate area:
{
this.getField("form1").display = display.visible;
this.getField("form2").display = display.hidden;
this.getField("form3").display = display.hidden;
}
else if (event.value == "Incident at Aircraft Destination Form")
{
this.getField("form2").display = display.visible;
this.getField("form1").display = display.hidden;
this.getField("form3").display = display.hidden;
}
else (event.value == "Medical Emergency Form")
{
this.getField("form1").display = display.hidden;
this.getField("form3").display = display.visible;
this.getField("form2").display = display.hidden;
}
The Problem is I cannot name the other forms. I've even put text boxes with "form1" etc over the form itself thinking it would work, but it doesn't. I do know some JS but I'm not an expert so any advice would be appreciated.
JIC this is what the first page of my PDF looks like:
Thanks again!!!
You can display/hide form fields, but not whole forms.
Copy link to clipboard
Copied
I know I have seen this post but nothing is as specific as I need it to be and I know I am doing something wrong.
I made this form in Word and transferred it over to Acrobat Pro DC
In the drop-down box (Emergency Landing / Crash) I have 3 options. When I pick one, I am trying to get a new fillable PDF form to appear. I have each form needed on the same PDF page.
This is one of the forms that I need to "appear" when I click one of the options:
So I've Inserted the JS into the Validate area:
{
this.getField("form1").display = display.visible;
this.getField("form2").display = display.hidden;
this.getField("form3").display = display.hidden;
}
else if (event.value == "Incident at Aircraft Destination Form")
{
this.getField("form2").display = display.visible;
this.getField("form1").display = display.hidden;
this.getField("form3").display = display.hidden;
}
else (event.value == "Medical Emergency Form")
{
this.getField("form1").display = display.hidden;
this.getField("form3").display = display.visible;
this.getField("form2").display = display.hidden;
}
The Problem is I cannot name the other forms. I've even put text boxes with "form1" etc over the form itself thinking it would work, but it doesn't. I do know some JS but I'm not an expert so any advice would be appreciated.
JIC this is what the first page of my PDF looks like:
Thanks again!!!
You can display/hide form fields, but not whole forms.
Copy link to clipboard
Copied
You can display/hide form fields, but not whole forms.
Copy link to clipboard
Copied
This line in your code is incorrect:
else (event.value == "Medical Emergency Form")
If you include a condition it must start with "else if".
Copy link to clipboard
Copied
Thank you so much! I always mess if else statements up!