Creating Form Fields in Acrobat
Instructions
Section 7.4: Automatically Adding Form Fields
After your document has been imported into Acrobat, we need to create the form fields. Form fields are like text boxes and allow you to enter your information. There are two ways to add your forms, automatically and manually. To add your form fields automatically, you need to use the Prepare Form Tool. To use this tool,
Go to the All Tools pane on the left side of the screen and click on the Prepare a Form Tool.
The Choose an Option to Create a Form page will open. Be sure that you are on the Select a File option. Select your untagged PDF, and leave the option for This Document Requires Signatures unchecked. We will add a signature line ourselves later on.
The option for Form Field Auto Detection should be left as on.
Click the blue Create Form button.
Now your tool has added form fields to your entire PDF document. Field Names and Tooltips are also added, but you should check those to be sure they are accurate.
This tool will automatically add form fields to your document and your PDF will be open in Form Editing Mode. One thing to keep in mind is that the tool will only create text box form fields. If you only use form fields for typing in text, that is okay, but if you need to create check boxes, or dates, or other complex form fields, you will need to make those manually. Field Names and Tooltips are also added automatically, but you may want to edit them.
Section 7.5: Editing and Swapping Form Fields
Now that your form fields have been created, you need to check them all. Some fields could have been made that are not meant for their space. Others spaces may need different types of fields. A few could also have the wrong names. Be sure you check each one carefully and change them accordingly. The Prepare a Form pane gives you 10 different form types to create. These include,
Text Box
Check Box
Radio Buttons
List of Choices
Dropdown List
Action Button
Image Field
Date Field
Signature Field
Barcode Field
When you click on a form field component, a second section will appear in the Prepare a Form pane. This will give you visual styling options that affect your form fields alignment, Centering, Match Size, and Distribute.
Deleting Forms
Many of these fields can be used in accessible ways for your project. In our example, we are going to use some of these form fields to make our application accessible. First, we are going to delete the forms that were automatically created for us that we do not need. In this case, the Date field is a text field, but we want it to be a Date Field.
To delete a form field,
Click on the form field you want deleted.
Press the Delete key.
OR
Right click on the form field you want deleted.
In the dropdown menu click Delete.
Adding a New Form Field Manually
Go to the Prepare a Form tool on the left side of the screen. Click the type of form you want created. In this example we will click the calendar icon to create a Date Field.
The field is created on your cursor. Click the location where you want the field. Then scale the box to fit the location. Click on the Selection Tool and scale your form field box until it fits on the line.
Go to the Fields Pane on the right side of the screen. In the expansion menu of your form field, change the name to a unique name for your form field.
In our example, it will be changed to Date.
Unique Field Names
All field names need to be unique. If you do not have unique field names, Acrobat will duplicate any tool tips you made to all of the fields that share the same name. This can cause a lot of confusion if you use a similar name frequently in the document. For example, if you have a field name called City/State, you cannot have another field name use City/State in the PDF. If you do, the readers may not know what information to put down. Keep this in mind when naming your fields.
Tooltips
When the screen reader reads the form field, the name will be read first, followed by the tooltip. Tooltips should be written like instructions telling the reader what to do for filling out the form field. When you have created a tooltip, you can enter Preview mode and hover your mouse over the form field and a small grey box will appear with a tool tip inside. Keep in mind that tool tips should never include words for the type of field. An example could be “Check box Yes”. This is because screen readers will announce that information automatically.
To add a Tool Tip,
Double click on your form field.
In the Text Field Properties box, go to the General Tab. Type in your Tooltip in the Tooltip box.
Marking Fields as Required
If you have a field in your form that is required, you need to be sure they are marked. To mark your form field as required,
Double Click on your form field.
In the Text Field Properties box, go to the General tab and check the Required Box.
When you click on the Close button, your form field will turn red. That means it is required. However, people who are color blind or have low vision may miss this queue.
If all fields in the form are required, you should note this in the instructions at the top of the PDF. If certain fields are required, mark them with an asterisk or the word (Required) in parenthesis within the visible field label. Also, include a note in the instructions like “All fields with an asterisk are required.” Then for screen reader users, you should include the word (Required) in the tooltip.
Text Field
Text fields allow users to type in text like addresses, phone number, and names.
In our example, we will use the “If yes, please explain” form field. When you create the form fields automatically, the name will be automatically generated.
When you open the Text Field Properties box, you will see that the name and tooltip have the same text. Sometimes it is accurate, but they should be checked. Change the tooltip to, “If you have been convicted of a felony, please explain.”
Check Boxes and Radio Buttons
Both check boxes and radio buttons can be made in Adobe Acrobat. However, it is not recommended to make them because there are more accessible ways to give people options. Typically, check boxes and radio buttons take several steps to access. Instead of using them, create dropdown lists with the options inside. If you want users to give you more than one answer, create a text box form field and let them type in one answer or multiple answers.
Dropdown List
A dropdown list allows a user to select a single option from a dropdown list of options.
To create a dropdown list,
Delete the form field you want replaced.
Go to the Prepare a Form Pane on the left side of the screen and click on the Dropdown List button.
Click and drag your dropdown menu form field to create the form field in its location.
Double click the field to open the Dropdown Properties box. Include a name and tooltip.
Next, go to the Options Tab. In the Item box, type in your item and click on the Add button to add it to your item list. In our example, the options will be Please select an option, Concierge, Front Desk, and Housekeeping. Make sure that Please select an option is at the top of the Item List section so it will be read first by a screen reader. After you have your items listed, close the dialog box.
You can also go to the Appearance Tab and change the font used in the form field. In the example, the font is changed to Times New Roman, Size 14.
Test your dropdown menu by clicking the Preview button and clicking on your dropdown menu.
Buttons
Buttons can be used to make a change on computers. You can use them to clear forms, submit forms, or open files. For our example, we will make a button to clear a form.
To make a clear form button,
Go to the Prepare a Form pane on the left side of the screen and click the Button Tool.
Click and drag to create the button on your line. In this case, the clear form line.
Double click on the form field to open the Button Properties box. In the General Tab, give the button a name and a tooltip.
Go to the Appearance Tab and set the font size to 14 and the font to Times New Roman.
Go to the Options Tab. Change Behavior to Push. Then set the Label to Clear Form.
Go to the Actions Tab and in the Select Trigger dropdown menu and choose Mouse Up. In the Select Action Dropdown menu, choose Run a JavaScript. Click Add Button.
Copy and Paste the JavaScript below and click OK.
Test your new button. You should get a warning asking you to proceed. This means your script works.
Digital Signatures
A signature field allow users to sign a document with a digital signature. When you create your form fields automatically, the signature form field is made for you. When you double click on the Signature form field and go to the General tab, the name and tooltip is also made for you. Users can use their existing Digital ID or make a new one.
Field Actions
In Acrobat, you can assign various actions to fields using either built-in actions or custom JavaScript. These actions can be triggered by events such as mouse entry, mouse exit, mouse up, mouse down, focus, or blur. Examples of actions include:
Executing a menu item
Importing form data
Playing a sound
Playing media
Running custom JavaScript
And more
To configure these actions, open the Properties dialog and navigate to the Actions tab. From there, you can choose from a list of predefined actions or input custom JavaScript to create personalized functionality.
When assigning actions to form fields, it's essential to follow these accessibility guidelines:
Avoid actions that depend solely on mouse interactions. All actions must be fully accessible using a keyboard.
"On focus" actions occur when a field gains focus, and "On blur" actions occur when a field loses focus. Use these actions sparingly and with caution.
If you assign an "on focus" action, ensure it does not redirect the focus to another field unless that field is intentionally excluded from user interaction.
Do not trap the keyboard focus within any field. Users should be able to navigate seamlessly through all form fields using only the keyboard.
Validations and Error Prevention
When a person fills out your form, you need to be sure they have filled out the form correctly. To help the reader, we can create error messages for them to see if they place the wrong information in your form boxes.
Some examples include:
A required field being left blank.
An email address is listed without a domain name.
A zip code is entered with more or less digits than requested.
A phone number with letters entered instead of numbers.
Your goal should be to:
Inform users of the error.
Provide information on how to fix the errors. Alerts must be:
Clearly stated
Provide actionable feedback messages
Draw attention and focus to the message
Be styled distinctively from form inputs (the dialog in Acrobat takes care of this by default)
Be fully accessible
For documents with Legal and Financial Purposes, as well as tests or have lots of data have to be made carefully. Errors in these types of data can be problematic. If your form is related to any of those, you need to have one of the following.
The submission is reversible.
The data entered by the user is checked for input errors and the user has the opportunity to correct them.
There is a mechanism available to review, confirm, and correct information before finalizing the submission.
To make this in Acrobat, you need to use JavaScript. For an example, we are going to have users enter a social security number.
Double click on the Social Security Number field to open the Properties box.
Go to the Format Tab. In the Select Format Category dropdown menu, click Special. In the Special Options List, click on Social Security Number.
Go to the Validate Tab, and check Run Custom Validation Script, then click the Edit Button.
In the JavaScript Editor, type in your JavaScript.
Section 7.6: Tab Order
Now that all of your form fields have been completed, you need to test the tab order of your PDF. A user may not be able to use the mouse to click from one form field to another. A good alternative to access the form fields is by using the Tab Key. To test your PDF, click the Preview Button and hit the Tab Key several times. What should happen is that the first form field at the top of the PDF should be highlighted first. Then by clicking the Tab Key again, the form next to or underneath the first form field will be highlighted. If a form field is skipped, that means the Tab Order is out of order. To fix the Tab Order,
Go into the Prepare Form Tool Edit Mode.
On the right side of the screen, go to the Fields Section.
The Fields Section contains all of your form fields and gives you the ability to rearrange the order of the form fields. To move the form field order, click and drag the field you want into a new position.
Go back to Preview Mode and press the Tab Key to test the new location of your form fields.
Keep tweaking the Fields Section until everything is in order.