Create a drop down list populated with all folders in a network location.
Hi All,
We have a PDF form which we print and manually and fill in but I am looking at making it interactive.
I would like to have a drop-down to select a folder from our network in one section of the form.
I know this cannot be done in Acrobat alone with JavaScript, but after a bit of searching online it can be achieved by creating an external file.
So far I have
- Created a Windows PowerShell Script to create a .txt file which contains all the folders in the Network location. The plan is to run this at regular intervals to keep it up-to-date.
- Created a .js file in C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts that reads a text file from disk and sets a dropdown field’s items
3. Created a dropdown on the PDF but this is where it's falling over.
In the properties of the drop-down down I have selected 'On Mouse down' and set it to run a Java Script.
In the java script i have entered trustedImport();
After all this when i run it and try the Drop-down, nothing shows in the drop-down
Anyone done this or something similar? Javascript in not my thing so i may be doing something astoundingly obvious and it's not quite a straight forward as i thought.
