These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Pass form data from one form to another

shawnash
Registered: Dec 16 2009
Posts: 48

I would like to know if it is possible to pass the data from one form to another? If so, how would you accomplish this? I am using Acrobat 5.
 
I have 2 forms that if needed, the user could add data to a second form. But the top part of the form would be the same data as first form. I would like to pass the data thru to second form so the user doesn't have to retype everything if they need to add info on the second form. both forms will reside on a webserver to be accessed by intranet.
 
Or would it be easier to put as a second page on the original form. The only thing is - I only want the 1st page to print if the user doesn't need to add info to 2nd page.
 
Thanks in advance for any help...
Shawn

My Product Information:
Acrobat Standard 5.x or older, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You can use the FDF file to export and import form data. If you need to script it, you can do it but there are lot of security hoops to work through. Also there have been some additional security add by various newer versions of Acrobat which will require additional code. You can find this information in the Acrobat JS API Reference. The changes will be things like setting the doc 'disclosed' property to true, and for certain newer versions using an application folder level script to run the code using the new 'trustedFunciton'.

You can also pass data to a web script page and place it in a database and then feed the data back to the PDF or another PDF.

George Kaiser

shawnash
Registered: Dec 16 2009
Posts: 48
Thanks for your reply. That sounds like it could turn into a nightmare. What would be my options if I added the second page to the 1st page form? Is there a way to make it print only the 1st page if the second page isn't needed?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You cannot prevent a user from printing all pages, but you can provide a button on the document that will only print certain pages. See the Acrobat JavaScript reference for more information on the doc.print method.
shawnash
Registered: Dec 16 2009
Posts: 48
That sounds like it would work best to me, but could you be more specific? Will this take alot of coding to accomplish or is it just a few lines and simple? I tried using button properties to bring up menu items, but the only thing available was for batch processing print first page.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
No, it's very simple, just one line:

// print the second through fourth pagesprint({bUI: false, nStart: 1, nEnd: 3});
Place this code in the MouseUp JavaScript action of a button.


For more information on the print method, see:http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.511.php