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

Submitting form to URL

grlintheworld
Registered: Dec 21 2009
Posts: 66
Answered

Can somebody please walk me through the steps I need to take in order to have a form submit to a URL? I'm new to forms AND web design, so while I think I have a good handle on creating the submit button and setting it to submit to a URL, I need some help learning what to set up to accommodate this...

what do i have to create and upload to my server/domain?
how does the thing that accepts filled out forms then send me the information?

sorry for my ignorance - help is much appreciated!

My Product Information:
Acrobat Pro 9.2, Macintosh
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
Submit your form using Acrobat.com… and stop spending time with that technical stuff.

;-)
grlintheworld
Registered: Dec 21 2009
Posts: 66
I wish I could, but since the form is going to be on the web, I can't use the distribute function (wouldn't know who to distribute to, since it's an order form!), which means I can't collect the info using Acrobat.com...
grlintheworld
Registered: Dec 21 2009
Posts: 66
Somebody gave me the idea to look on my web host (godaddy) to see if they had any instructions on how to do this. I was able to find that they have a "PHP form mailer." This is what it says under how to use it, but it seems to be for a form built in HTML. Does anybody know how (or if) this relates to forms made in Acrobat that are going to be used on the web?


1. Create a Web form, assigning unique names to your form fields.
2. In the form tag, assign /webformmailer.php to the action attribute and set the form method to post:

3. In addition to the form fields you create, there are three hidden elements you can use.

form_format determines in what format the information is delivered. Its values are 'text', 'csv', 'html', 'xml', and 'default' (same as 'text').

form_order dictates in what order the fields are reported. Its values are 'default' (the same order as they appear on in the form), 'alpha' (alphabetized by field name) or a comma-separated, case-sensitive list of all or some field names.

form_delivery determines the frequency and packaging of deliver. To receive one email per form submission, the form_delivery values are 'default' (every 15 minutes), 'hourly', and 'daily'. To receive all submissions in an attachment of one email, the form_delivery values are 'digest', 'hourly_digest', and 'daily_digest'.

For example:First Name:
Last Name :
Email:
Comments:
Type comments here.
grlintheworld
Registered: Dec 21 2009
Posts: 66
ok, this is doing my head in. i've been all over the internet trying to figure out how to do this, and all i can find is how to use a cgi or a php script for an HTML form, not for a PDF form. Can anybody tell me how to do this successfully for a web form? I've managed to get my form to send info through my server to my email address, but these emails are all blank - they don't contain any of the info from the form.

please help!!!
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
In fact, you can use the distribute form function to setup a web form for use with Acrobat.com. During the process it will ask you whether you want to send the form out to an email list or save it to a folder. Save it, then up load to your web site.

Of course once you do this you are locked into Adobe's workflow. The traditional way of doing this for your own server side DB is to write a server script to handle submission from a PDF. Acrobat submits data to an URL with an HTTP Post. I've answered several questions on this forum about this very issue. Do a search and you'll find lots of info.

But the important bit for you is that one of the submission format options is HTML. Which submits the data exactly like a web page. Take a look at the submit action options. Your provider's php script doesn't care where the data comes from as long as it's submitted in this format. Give it a try.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

grlintheworld
Registered: Dec 21 2009
Posts: 66
Thanks, Thom. I'm going to try this now (and look up your articles). One question...When I am setting up the distribute function, do I just leave that URL field blank then?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
If you are going to use Acrobat.com for the form data handling then use that option in the Distribute Form Wizard. If you are going to use your providers, or your own server side script then do not use the Distribute Form Wizard. Use an regular form submit button instead. You only use the wizard when you are going to use the Acrobat Data Collection workflow.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

grlintheworld
Registered: Dec 21 2009
Posts: 66
Ok, I think I'm confused (what's new).

When I try to use the distribute function that is built right into Acrobat in the forms menu (this is what you meant by distribute wizard, right), I select the first option in the drop down menu (automatically download and organize responses with Acrobat.com), and then it takes me to a menu where I need to fill in the "to" field, with email addresses. I don't see any place on here where I can just save the form like you mentioned. As I'm not distributing this form to specific people, but having it on my website for customers to fill out if they want to order, I don't know how to make this work...

And if I make my own submit button, and in the actions tab, add a "submit form" action, then I get the URL field, which I don't think I want either.

This is not making any sense... :(
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Just distribute the form to yourself. It doesn't really matter at this point. All you want the wizard to do is to prep the form so that it submits data to Acrobat.com. At some point the wizard is going to save the form to disk and that is what you post on your website.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

grlintheworld
Registered: Dec 21 2009
Posts: 66
Oh, I see. OK - thanks! This worked perfectly. Phew! Was starting to think I'd never get it. Thanks heaps for your help, Thom! Happy New Year! :)
grlintheworld
Registered: Dec 21 2009
Posts: 66
Thom, quick question. Just wondering if it's possible to create my own button that acts in exactly the same way as the submit form button provided by acrobat to use when filling out a distributed form...
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, You'll find "Submit Form" on the Action List for a button. This can also be done with JavaScript:

Here are some related articles:
http://www.acrobatusers.com/tutorials/2006/submitting_data
http://www.acrobatusers.com/tutorials/create-acrobat-form-and-submit-data-over-web

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

grlintheworld
Registered: Dec 21 2009
Posts: 66
When I try that submit form action for a button, I get the option to submit to a URL or to an email address or something. How can I get it to submit to my _responses file that I can view in the tracker, just like with the built in button?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
If you place a button on the form, with a submit action, then the distribution Wizard should be able to identify it and fix it up. At least it used to.

The steps in the distribution/collection workflow are

1. User fills out and submits form
2. Form is emailed to you
3. You recieve form as an email attachment.
4. Double click on form attachment.
5. Data is transfered to collection file.

So data is not submitted directly to the collection file, it goes through the email.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Opps, you're using Acrobat.com? In that case things are a little different. Acrobat 9 contacts Acrobat.com and submits the data through some unknown backend mechanism. This same mechanism is used on your side to retrieve the submitted data from Acrobat.com.

However, the basic idea is exactly the same. If you place a submit button on the form the distribution wizard will recognize and modify it for the submission process.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

grlintheworld
Registered: Dec 21 2009
Posts: 66
I guess I'm a little bit unsure how to do this. I place a button, and go to action, and chose Submit Form. In the dialog box that comes up, it prompts me to enter a URL for this link. Then it asks me which format I'd like to export to (FDF, HTML, XFDF, PDF). I guess I'm not sure how to configure this to act like the Acrobat submit button so that all of the info goes to Acrobat.com...
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The URL you choose for the submit action is unimportant. It's going to be overwritten. Set the submission format to PDF, although this is probably also unimportant. The important bit is that the button has a submit Action. It also helps if the button is named submit and has "Submit" as the caption.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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