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

Importing data into a 2nd form

Igotoxtremes
Registered: Mar 13 2008
Posts: 2

Hello, and thanks to anyone who can help.

I am an intermediate level Acrobat 7 Pro user and have several forms that I use for my business.

My goal is to have customers fill out one form that they get off of my website (which I have already created and use currently) and then submit by email. However, I have little reason to import that data into the same form they just filled out. Instead, I would like to import this data into a second, more robust form that I can then use as a contract. I have already created this form as well.

The second form has additional fields to fill out, but the fields that are shared do have the same field names. When I try and import a data file into this second form absolutely nothing happens. I think this might be due to the data being given field names in the data file (e.g. F[0].P1[0].EventDate[0]) that don't show up in the form itself. I don't know. I hope this isn't too confusing. It is to me.

Is it possible to do what I am trying to do? HELP, Please :)

Ryan

My Product Information:
Acrobat Pro 7.0.9, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The example name you give, i.e. "F[0].P1[0].EventDate[0]", is a LiveCyle form field name. Did you create this form in LiveCyle designer? If you did, then you've got a bit of a problem.

You have the right idea, giving fields in the different forms the same name, but with LiveCycle forms, the form hiearchy is part of the name. If the hiearchy of the two forms do not match, you can still make this work,

First, try simply exporting to XML from one form and then importing the XML into the other form. LiveCycle does some simple name mapping into the hierachy, so if your forms are simple enough and similar this may work. If this does not work you will need to add an extra step. Basically you need to map the form fields from the different forms in to the same name space.

There are several different ways to do this, but the easiest way is to create an XML gramar for your form data that will work for both forms. It should be as simple and straight forward as possible, and also match the generic format used by Acrobat when the unbound form is exported to XML. Make an example XML file that has fields in it for everything you need. Then use the "Data View" tab in LiveCycle Designer to connect both your forms to this example XML. Make sure all the relevant fields in both forms are "Bound" to the correct fields in the XML.

When this is done, you should be able to export data from one form to XML and import it into the other one.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

tyler_v
Registered: Mar 26 2008
Posts: 1
I have the same thing...I am able to export data from one form and import it into a second form. On this second form though not all fields have dynamic binding..and this is where I am running into problems. The data is being imported into the right fields...but I need to export all the data from this form as well. It appears that the fields with dynamic binding is being exported. Why won't all the fields export there data.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
LiveCyce forms have the annoying behavior of only exporting nodes in the data model, i.e., only field that are bound to the data model. You can change the binding dynamically, but this is a pain.

Another method is to use code to modify the data model before exporting data. but this is also a pain, and not always robust.

One way to have the appearance of different import and export binding is to use a set of hidden fields that parallel the unbound fields. These hidden fields are bound to the data model. Use code to copy data in and out of them to the non-bound visible fields.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script