Editing Form Field Names with AutoMailMerge Form Tools
What are PDF forms?
Adobe® Acrobat® provides form editing tools that can be used to design PDF forms - special kinds of PDF documents that contain interactive fields where textual information can be entered, or check boxes may be selected.
You can create a PDF form from any PDF, word processor, image file or a scanned paper document. Fields can be added to a regular PDF document using the form editing tools provided – these documents can then be widely used to easily collect data when distributed. Useful for handling government, business or payroll data, PDF forms are a simple way of having people dynamically fill-in information clearly, and can be easily sent and returned in a portable electronic format.
Introduction
Typically, you would have to re-open the “Prepare Form” tool in Acrobat to view and make changes to form fields. This is a much slower method for manually renaming form fields one-by-one, or checking their configured settings.
In this tutorial, we will look at some handy tools provided with the AutoMailMerge™ plug-in, useful for renaming/editing form fields and quickly viewing their properties. The “Rename Form Fields by Text Search” and “Edit Form Field Names” tools can be used for renaming multiple form fields at once. This is useful for producing clearer PDF forms to maximize functionality and simplify the mapping stage when carrying out a mail merge:
We will also look at using the “Inspect Form Fields” tool – useful for viewing form field properties by simply hovering the cursor over them.
Use the separate "creating interactive PDF forms" tutorial for help creating and customizing PDF form fields with the "Prepare Form" tool.
Input Document Description
To demonstrate using these tools, we will use a sample PDF form used to create invoices via a mail merge. It contains various text fields, both for single-line and multi-line text entry. All fields have been created using the "Prepare Form" tool in Acrobat (see tutorial link above). All existing field names are shown in the image below:
Prerequisites
You need a copy of Adobe® Acrobat® along with the AutoMailMerge™ plug-in installed on your computer in order to use this tutorial. Both are available as trial versions.
USING THE "RENAME FORM FIELDS BY TEXT SEARCH" TOOL
Step 1 - Open the Tool
With a PDF containing interactive form fields open in Acrobat, select "Plug-Ins > Form Tools > Rename Form Fields By Text Search..." to open this tool.
Step 2 - Perform a 'Search and Replace' Operation
Use this dialog to rename PDF form fields in the currently-open document via a 'search and replace' operation. This searches the document for field names containing specific text, and automatically changes all occurrences to a user-specified replacement. Begin by checking "Perform search and replace on form field names".
First, enter the field name text to search for in the "Find text:" box. In this example, we will search for the "ClientDetails" field.
Note: searching only for the word "Client" would match both the "ClientDetails" and "ClientID" fields.
Next, type the text you want to replace this search text with into the "Replace with:" box. "ClientDetails" will be replaced with "Name/Address".
Optionally use the "Use regular expressions" processing option to search for text using regular expression syntax. This can be useful for searching for text that follows a specific pattern - for example, automatically-assigned field names may follow a unique format featuring numbers and letters.
The "Match Case" option can be used to make the text search case sensitive - only exact matches will be identified.
Press "OK" to run the search.
Step 3 - Confirm Field Name Changes
All field names matching the text search will be listed here. Name replacements will be shown under "New Field Name" on the left, and can be manually edited by clicking on each cell.
Optionally use the "Save..." button to save and reuse field name changes shown here. The "Load..." button can be used later to import saved field name changes, and run the same procedure on other input PDF forms.
Choose a folder location for saving to. Optionally rename the default "File Name Pairs" file name - it will be saved in *.csv spreadsheet format. Press "Save" to proceed.
The spreadsheet is created using the format shown below. Any *.csv spreadsheet can be created manually following this format, and imported via the "Load..." button. All existing field names must be listed in column B, with their new replacements listed in column A, under the given headings.
Step 4 - Run the Operation
Press "Apply" to run the operation.
Note: this operation creates a new PDF file containing any renamed fields - the original file is unaffected.
A report box opens showing the number of renamed fields. Press "OK" to close it.
Step 5 - Check the Results
A new PDF version of the input is opened in Acrobat and can be saved manually via "File > Save As...". The chosen form field will have been renamed in this version.
Step 6 - Add Text to Existing Field Names
Also use the "Rename Form Fields by Text Search" dialog (step 2) to insert additional text to the beginning or end of all existing field names at once.
First, disable the 'search and replace' feature. Next, type any text to be inserted either before existing form field names, or appended after.
In this example, "_Field" will be added to the end of all field names. Press "OK" to proceed.
The "Confirm Form Field Name Changes" dialog now lists all form fields in the input, with the new field names appended with "_Field" on the left. Any new field name can be edited manually by clicking on the cell.
The "Load..." button can be used here to import a field renaming scheme created manually using Excel (see step 3 above).
Press "Apply" to rename the form fields.
Inspect the renamed fields in the output to check that the specified text has been inserted.
USING THE "EDIT FORM FIELD NAMES" TOOL
Step 7 - Open the Tool
With a PDF containing interactive form fields open in Acrobat, select "Plug-Ins > Form Tools > Edit Form Field Names..." to open this tool.
Step 8 - Edit Form Field Names
In the "Edit Form Field Names" dialog, all given field names in the input will be listed on the right. Change the "new" versions on the left by clicking on each cell and manually editing them.
Press "Apply" to rename the form fields.
Optionally use "Load..." to import a saved *.csv spreadsheet of field name changes (see step 3 above).
Check the output document to ensure that field names have been changed correctly.
USING THE "INSPECT FORM FIELDS" TOOL
Step 9 - Open the Tool
With a PDF containing interactive form fields open in Acrobat, select "Plug-Ins > Form Tools > Inspect Form Fields Tool".
Hover the cursor over a form field, and it will become a cross-hair symbol. The border of the highlighted form field becomes red, and a callout box appears listing details about the field. It shows the field name, followed by field type, and single/multi-line settings (text fields).
The tool can be used to inspect form fields of any type - text fields, check box fields, radio buttons, image fields etc.
Click here for a list of all step-by-step tutorials available.