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

Web form data collection and use

jai1107
Registered: Feb 3 2009
Posts: 4
Answered

A friend of mine asked me to help him with a project. I have created two seperate forms that use the same data. The first form is user-friendly for publication on a website, the second has the same fields but is easier to read for his estimators.

The forms were created in Professional 7. I have included a submit buttom in the first form that only sends the raw data (xfdf) to an email address. The second form resides on the esimators' desktop with the same file name as the one one the web. They all have Reader 9.

During the initial testing, the system worked well. The xfdf data comes in via email and the estimator double-clicks the attachment. Reader will open and the following message appears:

[i]The file you are attempting to open contains comments or form data that are supposed to be placed on. This document cannot be found. It may have been moved, or deleted. Would you like to browse to attempt to locate this document? [/i]

After browsing and selecting the second form, it opens with the data imported. This was fine when the data was generated from a form that rested on a hard drive. When the form is filled and submitted from the website, the estimator double clicks the data file, Reader opens a browser, goes to the website and places the data in the first form.

How can I fix this or is there a better way to do what I'm trying to accomplish? The estimators aren't very computer savvy and my friend can't afford to put Acrobat on their machines, which would probably make importing data a ton easier.

Thanks for any suggestions.

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
It's possible to use JavaScript to submit a form using a mailto type URL and specify that the file specification of the PDF from which the XFDF originated does not get included in the file. For example:

// Submit as XFDF, but don't include the F keysubmitForm({cURL : "<span class="spamspan"><span class="u">bogus</span> [at] <span class="d">example [dot] com</span></span>", bExclFKey : true, cSubmitAs : "XFDF"});

Unfortunately, when Acrobat executes this it does not give the user the same option to save the data file locally so the user can attach it manually to an email message, as it does when you use a "Submit a form" type action.

The problem when you set up a "Submit a form" action in Acrobat is the user interface provides no means for specifying that you do not want to send an F key with the data file (like it should). However, it may be possible to set up such an action with the help of an appropriately configured FDF file that the creator of the form could use to configure the submit button. I haven't confirmed this, but will if you're interested.

In other words, it is possible to set up a submit form action that excludes the file specification, which would solve the problem you're having. If the JavaScript option above won't work for you, the other ~might~ be an alternative.

George
jai1107
Registered: Feb 3 2009
Posts: 4
Thanks, George. It worked!!

I did have to add the [b]mailto[/b] command to the code you provided but that wasn't a big deal. Not having worked much with JavaScript, especially outside of html, I hadn't even thought in that direction. I guess I'd better learn some more.

Thanks again!!