Expand my Community achievements bar.

Designer 7x Forms Question

Avatar

Former Community Member
I'm not sure if this question has been asked or not, so here goes.



I have a list box with 50 different items in it. Depending on the item selected by my user, I want an associated interactive PDF form to be retrieved. I've set up a master page in Designer and have identified a subform (although I'm not sure if that's necessary) and have saved this file as a template.



I could take the "easy" route of just having bookmarks of all 50 PDF forms but I want to make it work "slick."



I've been searching through every bit of documentation available trying to see if this is even possible.



If there's an answer, please keep it as simple as possible. While not completely new to Designer, I'm not a programmer and if this is something that's going to require java scripting then I'm lost.



Thanks!



Barb
1 Reply

Avatar

Former Community Member
Hi Barbara,



Unfortunately what you want to do will require that you write some java script.



I have put together a sample with a list box that contains three files. To get the sample to work select the list box, click on the object tab and then on the binding sub-tab. Change the Value of all three Items to point to a different PDF files on your system.



If you then open the sample in acrobat and select a item from the list the associated PDF will be opened.



The files are opened by the following line of javascript which was added to the change event of the list box.



app.openDoc(xfa.form.form1.ListBox1.boundItem(xfa.event.newText));



The xfa.event.newText returns the text of the selected item.

The xfa.form.form1.ListBox1.boundItem(xfa.event.newText) returns the value associated with the selected item which is the absolute path of the PDF file to be open.

The app.openDoc(...) opens the file specified.



Hope this helps



Denver

Adobe Enterprise Developer Support