Copy link to clipboard
Copied
I am building an Acrobat pdf form (via DC pro) in which I would like to populate the lists dynamically according to user selection.
To explain, I will examplify
I have 5 form fields defined as list-boxes: continent, country, region, city, town
I want user to select them respectively, and show only the relevant content in the next list-box.
So, if a user selects Europe as a continent, she/he will be able to see for instance France, UK, Spain, etc; but not USA.
And, if the user continues on for instance by France, then she/he will be able to see Marseille, Nantes, Paris, etc. in the next box...
And so on...
I could link the first two boxes thanks to detailed guideline by Thom Parker: https://acrobatusers.com/tutorials/js_list_combo_livecycle​
BUT, how I proceed if I have MULTIPLE dependency?
I would appreciate to hear any experience/advice.
Copy link to clipboard
Copied
The trick is to extend the scheme outlined in the article to the next level of fields. An easy way to this is to simply create duplicates of all the objects and functions, renamed of course, that you used already, and apply these to the next drop down.
As you do this there are some issues that will become apparent. For example, a list change in one dropdown, will mean the following dropdowns will need to be cleared. There are a number of these management issues that become increasing complex as you add more levels of dropdowns. Another one is maintaining the current state of the fields when the form is saved and restarted.
You're getting into advanced scripting territory here, so it's going to take some focus and effort to get it right. I've created scripts and examples that extend this scheme on this subscription site:
https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm
Copy link to clipboard
Copied
Thank you.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more