Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adobe Form Field Question 4

Status
Not open for further replies.

jhein

Programmer
Feb 17, 2003
46
0
0
CA
I have a client that wants to be able to access the data fields on a PDF form. They want to be able to add info to a form or select info from a form field...does anyone know how to go about this? I am new to the world of Adobe, so please be kind!
 
You will need the full version of Acrobat to add the form fields in so that they can be used for adding info.

Tony Perkins
 
What is your environment? Are you hosting the forms on a web server?

If you design the form in Acrobat, and host it on a web server, your client can access the form, fill it in, and post the data back to your web server.

You can then do anything you want to with the data.

Thomas D. Greer
 
Hi TGreer,
Can you give a more detailed approach to this because I am trying desparately to do the same thing but with no luck.
-Chrissy
 
Chrissy,

Sure. You just... do it! What step in the process is causing you trouble?

Really, it's as simple as

1) Creating a PDF Form with Acrobat. You create all the fields you want with the Form Tool.

2) Put at least on Button on the Form. In the properties for the button, select the "Actions" tag. Set the trigger to "Mouse Up". Set the action to "Submit a Form". In the Actions section, select "Submit a Form" and then click "Edit".

3) Enter the URL of the web page that will process the form results. This can be an ASP page for example that iterates through the Request object.

4) In the dialog, choose your Export Format. Simplest is HTML. In field selection, check the fields you want submitted. It's common to select everything except the submit button itself.

5) Save the PDF and put in your website. When users browse to it, fill in the form, and click the button, the form data will be submitted to the application you specified in step 3. You process the results the way you would any HTML form. Do whatever you like. Store the data in a database, anything. Return some result page.

Hope that helps. If not, query me again.



Thomas D. Greer
 
TGreer,

I have a PDF form that is an application. It has text boxes and check boxes and I think a couple other controls.

You say that I can host my PDF on a webserver and "Save the PDF and put in your website. When users browse to it, fill in the form, and click the button, the form data will...".

Do you mean I don't need to create an HTML document (with forms) if I have a PDF forms document? If so, how do I "host" my PDF on the web server so users can go to it and fill it out???

Secondly, once I do this and add the submit button, I am not sure I understand the ASP with the Request object scenario you described to capture this information. I am trying to learn PHP and if you could point me on using PHP instead of ASP, that would be great!!!

Ideally, I'd like to be able to capture each of the text boxes and check boxes etc into a database. I would then need to output the results in some way so that the reviewers of the application can review the application. How would I output this once I have the data in an database?
 
jjatcal,


You said:

"Do you mean I don't need to create an HTML document (with forms) if I have a PDF forms document?"

Answer: exactly so.

"If so, how do I "host" my PDF on the web server so users can go to it and fill it out???"

The same way you do any HTML page or document of any type! You put the PDF in a directory that maps to a web server URL. Exactly the same as HTML. The only additional step you might need to make, depending on your web server, is to map the PDF extension to MIME type "application/pdf".

As to ASP, PHP, whatever... it does not matter in the least. If you set the PDF form Export Format to HTML, that's what your web server program will see: a regular HTTP Post.

I don't program in PHP, but I believe it references HTML Form variables by prefacing their name with a dollar sign, right?

So if in your HTML Form (or PDF Form with Export Format set to HTML), you have a field named "myTextField", then in the PHP program to which the form is submitted, you would retrieve the value of that field with "$myTextField".

The key point is that your PHP program doesn't need to know anything about PDF or FDF... it's just processing a good old fashioned HTML Form.



Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
 
Sorry, I noticed I didn't answer your database question.

First, pick a database product. MySql is commonly and widely used with PHP.

Learn SQL.

Your PHP program with use SQL statements to interact with the database.

How are you learning PHP? Whatever resource you are using should cover database interaction in detail.

Here's the basic methodology/cycle.

Code:
 1) User browses to form
 2) User fills in form, submits form to someApp
3a) someApp parses/validates data
3b) someApp writes/reads/updates data to database using SQL
3c) someApp returns HTML result page to user
 4) user either quits or takes next step

I notice we're in the Acrobat forum, and we're rapidly diverging from that! Just realize that the "form" in the above scenario can be a PDF Form or an HTML form.

Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
 
This is terrifically helpful, Tgreer.

I did not realize you can use PDF just as an HTML form.

Thanks a bundle!
 
Hello All,
Thanks to all those who contributed to the above post, I have a similar requirement and the post gave me something to start with.
A clarification: Can the user download the form and fill it offline and then post the document? I have come across some fillable forms, but usually they do not save the data when I try to save them locally so I can work on it later. Do I still have these restrictions ??
 
You want the "Acrobat Forms Data Format (FDF) Toolkit" (found at There are kits for Windows, UNIX and Java in several programming languages. Tons of details and loads of samples that actually do work the way they are designed to (even if some of the uses are weenie - hey, they are samples afterall.).

Good luck.

--Shelle
 
Noticed everyone is talking about Adobe Acrobat forms so...
Is there a way to modify the shape of the text box form field?? Say with something that might look like this:

Brief Summary of Proposal:_________________________________
__________________________________________________________
__________________________________________________________

Or will the first line just not exist so the actual text box is rectangular and starts underneath the description...

Also, is there a way to label the fields in a certain order so that the tabbing order is screwy? - I've already tried the usual 3 options it gives.

Thanks a lot,
GBNina
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top