Publishing interactive PDF web forms

Learn how to publish interactive PDF web forms using Acrobat.

About web forms

PDF forms can be useful for submitting and collecting information over the web. This is done by providing several button actions that perform functions similar to some HTML scripting macros. You must have a Common Gateway Interface (CGI) application on the web server to collect and route the data to a database. Any existing CGI application that collects data from forms (in HTML, FDF, or XML format) can be used.

Before you make your forms web-ready, make sure that your form-field names match those sets in the CGI application.

Note:

CGI scripts must be built outside Acrobat, and their creation is not covered by the Adobe Acrobat product.

Add submit functionality

Use the Submit A Form action to send form data to an email address or to a web server by specifying a URL. You can also use the submit button to send other files back to a server or database. For example, you can attach scanned images or files to a form. The files are submitted along with the rest of the form data when you click the Submit button.

Note:

If your PDF form contains an email-based submit button, you can use the Distribute workflow to facilitate distributing the form to others.

  1. Choose Tools > Prepare Form, then select Button in the toolbar, and create a button.

  2. Double-click the button to open the Button Properties dialog box.
  3. Click the Actions tab, and select Mouse Up from the Select Trigger menu.

  4. Select Submit A Form from the Select Action menu, and then click Add.

  5. In the Submit Form Selections dialog box, type an entry in Enter A URL For This Link:

    • To send the form data to a web server, enter the destination URL.

    • To send the form data to an email address, enter mailto: followed by the email address. For example, type mailto:nobody@adobe.com.

  6. Make additional changes to the available options, and then click OK to close the dialog box.

    For information on the available options, see the next section.

  7. Change settings on other tabs in the Button Properties dialog box as needed, and then click Close.

Submit Form Selections options

FDF

Exports as an FDF file. You can select one or more of the available options: user-entered data, comments, and incremental changes to the PDF file. The Incremental Changes To The PDF option is useful for exporting a digital signature in a way a server can easily read and reconstruct.

Note:

 If the server returns data to the user in FDF or XFDF format, the server’s URL must end with the #FDF suffix—for example, http://myserver/cgi-bin/myscript#FDF.

HTML

Exports as an HTML file.

XFDF

Exports as an XML file. You can choose to export the form fields data, comments, or both.

PDF The Complete Document

Exports the entire PDF file that is your form. Although this creates a larger file than the FDF option, it is useful for preserving digital signatures.

Note:

 If the users that fill in the PDF form are using Adobe Reader, you must choose either FDF or XFDF for the Export Format option.

All Fields

Exports all form fields even if the form fields do not contain values.

Only These

Exports only the form fields you specify by clicking Select Fields and indicating which form fields to include and whether you want to include empty fields.

Convert Date To Standard Format

Exports all form dates in a single format, regardless of how they are entered in the form.

Add a Reset Form button

A Reset Form button clears any data a user has already entered in the form. It is like the Tools > Prepare Form > More > Clear Form feature, which is available to you when you create and edit Acrobat forms. However, you can set up your reset button so that it clears only specific fields.

  1. Choose Tools > Prepare Form, then select Button in the toolbar, and create a button.

  2. Double-click the button to open the Button Properties dialog box.
  3. Click the Actions tab, and select Mouse Up from the Select Trigger menu.

  4. Select Reset A Form from the Select Action menu, and then click Add.

  5. In the Reset A Form dialog box, do one of the following and then click OK:

    • Click individual check boxes to select or deselect the fields that you want to be reset by the button.

    • Select All.

    The list in the Actions tab now shows Reset A Form nested under the Mouse Up action.

  6. Click another tab in the Button Properties dialog box to continue defining properties for the button, or click Close.

Add an Import Data button

Use the Import Form Data action to enable users to fill out common form fields, such as name and email address, with data imported from another form. Users can also use the Import Data button to populate common form fields with their personal profile information. Only form fields that match are updated. The fields that do not match are ignored. Before you create an Import Form Data action, set up a form with common information form fields from which to export the data.

Note:

The Import Form Data action searches for the data file from which to import data in different locations in Windows than on Mac OS. In Windows, the Import Form Data action searches the Acrobat or Acrobat Reader folder, the current folder, the System folder, the Windows folder, My Documents\Adobe\Acrobat, and the folders that are in the PATH statement. On Mac OS, the Import Form Data action searches the Acrobat or Acrobat Reader folder and the System Preferences folder.

  1. Choose Tools > Prepare Form, then select Button in the toolbar, and create a button.

  2. Double-click the button to open the Button Properties dialog box.
  3. Click the Actions tab, and select Mouse Up from the Select Trigger menu.

  4. Select Import Form Data from the Select Action menu, and then click Add.

  5. Locate and select an FDF file, and click Open.

  6. Click another tab in the Button Properties dialog box to continue defining properties for the button, or click Close.

CGI export values

An export value is the information sent to a CGI application to identify a user-selected form field. You need to define an export value only if both of the following are true:

  • The data is collected electronically in a database over a company intranet or the web.

  • The data is different from the item designated by the form field, or the form field is a radio button.

    When defining export values, keep the following guidelines in mind:

  • Use the default export value (Yes) to indicate that a check box or radio button has been selected.

  • Enter an export value for drop-down lists only if you want the value to be different from the item listed—for example, to match the name of the form field in a database. The item selected in the drop-down list is used as the export value unless a different export value is explicitly entered in the Properties dialog box.

  • Related radio buttons must have exactly the same form field name but different export values. This ensures that the radio buttons toggle and that the correct values will be collected in the database.

Get help faster and easier

New user?