Copy link to clipboard
Copied
I am completely new to making forms and Javascripts. Someone else asked a similar question and the reply is not available.
I work at a university in Japan that is recruiting new students from other countries, yet expects them to fill out a form that is completely in Japanese. As the sole English-speaker, I want to make filling out the form as easy as possible. There are two fields where prospective students must choose a (1) "Desired School" and a (2) "Desired Department." If a prospective student wants to study in a certain school, they must choose a specific department within that school.
I know from learning Basic this requires an "if...then" entry, that may look something like "if A then A1, A2, A3..." or "if B then B1, B2, B3..." and so forth. Unfortunately, I don't know how this works with Javascript.
Help please.
Copy link to clipboard
Copied
Hi Dltravies
Hope you are doing well and sorry for the trouble. As described you want to connect two dropdown list using forms in Acrobat DC.
The workflow you are trying to achieve is possible using the JavaScript. For more information please check the help page https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_developer_guide.pdf
Hope this information will help
Regards
Amal
Copy link to clipboard
Copied
Employing JavaScript with Dependent dropdown menus or listboxes is not a trivial task, specifically for a beginner in Acrobat JavaScript.
Your best bet in this case is to hire a developer that can help you with this project.
Copy link to clipboard
Copied
Hello!
I used to be a teacher for this school. Whenever I asked for supplies for my classroom, they suggested I go to Japan's version of the Dollar Store. So I want to learn and become an in-house developer.
Do you have any suggestions on where to start?
Thank you so much for responding.
DL
Copy link to clipboard
Copied
++In addition to all the great suggestions,
Are you interested in getting trained in Acrobat JavaScript in a classroom setting? Looking for online courses or distant learning ? self-paced coursewear?
Copy link to clipboard
Copied
Yes!
Copy link to clipboard
Copied
I would like self-paced courseware.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You need to use 'setItems()' to populate second dropdown field.
This is basic script how to do it ( there is plenty of those on this forum if you look for it)
you adapt script to your needs, it's used as 'Validation' of first dropdown field:
if(event.value == "A")
this.getField("Dropdown2").setItems(["A1","A2","A3"]);
else if(event.value == "B")
this.getField("Dropdown2").setItems(["B1","B2","B3"]);
else this.getField("Dropdown2").clearItems();