Publishing interactive PDF web forms

Publishing interactive PDF web forms

About web forms

PDF forms are a helpful way to gather and submit information online. They work by using button actions that perform functions similar to HTML scripting macros. To collect and send the data to a database, you'll need a Common Gateway Interface (CGI) application on your web server. Any existing CGI application that gathers data from forms in HTML, FDF, or XML format can be utilized.

Before making your forms ready for the web, ensure that your form-field names match those in the CGI application.

Note

Adobe Acrobat does not cover the creation of CGI scripts, and they must be built separately outside of the Acrobat software.

Submit web forms

To send form data, like scanned images or files, via email or to a web server, use the "Submit A Form" action by providing a URL. The submit button enables you to send the entire form data along with any attached files to a server or database with ease. 

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

Follow these steps to enable the ' Send a form' button:

  1. 1. Open a PDF document and then from the All tools menu, select Prepare a form

  2. 2. On the page that opens, select Create form

  3. 3. From the left panel, select Button and then position the button coordinates where you want to place the button.

  4. 4. Double click the button and then set the button properties as follows:

    1. Select Actions tab and then from the Select Trigger drop-down menu, select Mouse Up.
    2. From the Select Action drop-down menu, select Submit a form.
    3. Select Add.
  5. 5. In the Submit Form Selections dialog box, type a url in the Enter a URL for this link field. 

    • 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. 6. Select one of the following Export Format options:

    • FDFYou 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.
    • XFDFExports as an XML file. You can choose to export the form fields data, comments, or both.
    • PDF The complete documentExports the entire PDF file that is your form. It creates a larger file than the FDF option but the option 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.

  7. 7. Specify the Field Selection and date format as required. Once done, select Ok.

    • All fieldsExports all form fields even if the form fields do not contain values.
    • Only theseExports 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 dates to standard formatExports all form dates in a single format, regardless of how they are entered in the form.
  8. 8. Change other settings on the Button Properties dialog box as required, and then select Close.

Reset web forms

The 'Reset a form' button can clear all data entered in the form, just like the "All tools > Prepare a form > More > Clear form" feature available when creating and editing Acrobat forms. But, with the reset button, you can clear specific fields if needed.

Follow these steps to enable the 'Reset A form' button:

  1. 1. Open a PDF document and then from the All tools menu, select Prepare a form

  2. 2. On the page that opens, select Create form

  3. 3. From the left panel, select Button and then position the button coordinates where you want to place the button.

  4. 4. Double click the button and then set the button properties as follows:

    1. Select Actions tab and then from the Select Trigger drop-down menu, select Mouse Up.
    2. From the Select Action drop-down menu, select Reset a form.
    3. Select Add.
  5. 5. In the Reset a form dialog box:

    1. Select check boxes for specific fields or choose Select All
    2. Select Ok.

    The list in the Actions tab now shows 'Reset a form' nested under the Mouse Up action.

  6. 6. Change other settings on the Button Properties dialog box as required, and then select Close.

Import web forms data

The 'Import form data' action allow you to fill out common form fields, such as name and email, by importing data from another form. Additionally, you can use the Import form data feature to auto-fill those fields with your personal profile information. Only matching form fields get updated, while non-matching ones are ignored. Before setting up the 'Import form data' action, ensure you have a form with the common information fields from which data will be exported.

Follow these steps to enable 'Import form data' button:

  1. 1. From the All tools menu, select Prepare a form and then on the page that opens, select Create form.

  2. 2. From the left panel, select Button and then position the button coordinates where you want to place the button.

  3. 3. Double click the button and then set the button properties as follows:

    1. Select Actions tab and then from the Select Trigger drop-down menu, select Mouse Up.
    2. From the Select Action drop-down menu, select Import form data.
    3. Select Add.
  4. 4. Locate and select an FDF file and then select Open.

  5. 5. Change other settings on the Button Properties dialog box as required, and then select Close.

    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.

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 the following conditions are met:

  • 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, follow these guidelines:

  • For check boxes or radio buttons, use the default export value (Yes) to indicate selection.

  • For drop-down lists, provide an export value only if it needs to differ from the listed item, like matching a database field name. If no explicit export value is entered, the selected item serves as the export value.

  • Related radio buttons must share the same form field name but have different export values. This enables proper toggling and ensures accurate data collection in the database.

    • Related Articles

    • Fill in PDF forms

      Is the form fillable? Not all forms are fillable. Sometimes form creators don’t convert their PDFs to interactive fillable forms. Or, they intentionally design a form that you can fill in only by hand or with the Fill & Sign tool. These ...
    • PDF Forms basics

      You can use Acrobat to create forms using one of the following methods: Convert an existing electronic document (for example an Adobe PDF, Microsoft Word, or Excel document) to a PDF form. Scan a paper form to convert it to a PDF form. After you ...
    • Create and distribute PDF forms

      Create a form from scratch Start with a blank PDF document, add text, labels, and form fields to complete the form. For more information, see How to create a form from scratch. Create a form from an existing document When you convert an existing ...
    • PDF forms overview

      How to create a PDF form in Acrobat Create a blank PDF, add form fields, and save the form Can I create a fillable PDF form from scratch in Acrobat? Yes, you can simply create a blank PDF, add labels and fields you need, and save it. Get step-by-step ...
    • Edit PDF forms created in LiveCycle Designer

      You are here > Edit XFA forms Edit text in PDF Edit images in PDF Edit scanned PDF Edit secured PDF Unable to edit PDF Issue If you try to edit the PDF in Acrobat, you get the following error: This XFA form cannot be edited using Adobe Acrobat The ...