PDF In-Depth

PDF 101 - Adding form fields to PDF files

August 10, 2000

Advertisement
Advertisement
 

It is my experience that many students come into my introductory Acrobat classes not even thinking about the forms capability of Acrobat. They are there to learn how to make better-looking PDFs, and haven't had time or interest to look the powerful forms capability of Acrobat. After they see what forms can do, they say "Wow," and go back and try to implement forms at work.

I've often thought about why so few people walk into class with forms creation in mind. I have a few theories:

  • Forms are someone else's job. Many of my students are technical writers. Traditionally, forms have been created by the human resources and finance departments. With more forms going on the web, and more people filling out forms, I think technical communicators could be a big help in improving the effectiveness of forms.
  • Forms are boring. Forms are often an after thought, and the last thing done before a process rolls out or is modified. Forms are often handed off to an administrator who is seldom given any direction on what the form should look like.
  • Forms belong to the Web team. They certainly can be, but web designers need good direction to produce effective forms. Without effective direction, web-based forms can be as incomprehensible as the old paper-based ones. Again, this is an area where technical communicators can play a big role.
  • Forms really are a key to making a new or improved process a success. Interactive forms are definitely more fun to create than paper-based ones.

If you are ready to give forms a try, let's begin.

Overview

There are three ways to create a form:

  1. Convert an existing form.
  2. Create a shell in another application and add fields with Acrobat (or use PDFMark to embed fields in the authoring application).
  3. Use Web Capture to turn an html form into an Acrobat form.

The methods above require the full version of Acrobat 4. In this column, we will use a shell created by the U.S. tax agency, and add our own form fields with Acrobat. To begin, go to the tax forms download page of the Internal Revenue Service Web site and select PDF as the file type. Then download the "1999 1040EZ for Single and Joint?" Save the file on your local hard drive and close your browser. Then start Acrobat.

IRS tax form 1040EZ

Editor's Note: IRS form "1999 1040EZ" [PDF: 80kb] is also available for download from Planet PDF.]

Now it's time to start adding fields. Remember, you can switch from adding fields to "regular" view by clicking on the hand in the tool pallet, or by using the 'h' keyboard shortcut.

Step-by-step I

  1. Open 1040EZ.pdf in Acrobat.
  2. Select the Form tool. (If you don't know what it looks like, hold your mouse over the icons in the tool pallet until you see "Form Tool," or type the 'f' keyboard shortcut.)
  3. Marquee (click and drag) a box in the Your First Name area of the form.
  4. Name the field FirstMI.1.
  5. Set the form type to Text.
  6. Click OK.
  7. Use the Form tool to create the last name field.
  8. Name this field Last.1
  9. Add the address fields. For this form, it isn't necessary to add a number after the field name, but the best practice would be to name the fields Address.1, City.1, State.1 and ZIP.1 .You can skip Apt. no.

If you make a mistake, double-click on a field to change it. To move a field, click and drag. To resize a field, hold the cursor over a corner. The cursor will change from a gun sight to double arrows. Click and drag to resize the field.

At this point, you may be wondering, "What's the deal with the *.1," and when will we fill out the spouse name fields? Well, we will take care of those questions right now.

Step-by-step II

  1. Click on the field FirstMI.1 with the form tool. It should turn red, indicating it is the "target" field.
  2. Hold down the Control (Command MacOS) key and drag the form to the spouse first name area.
  3. Keep the field selected, and type a plus (+ ). The field name changes to FirstMI.2.
  4. Repeat the procedure for the spouse last name. To keep the upper and lower fields aligned, you can hold down the Shift key after you begin to click and drag.
  5. Type a + sign.
  6. Save the file.

Next, we will specify a certain kind of text field.

Step-by-step III

  1. Draw a form field over the boxes below "Your Social Security Number." Name the field SS.1 and keep its type as text.
  2. In the appearance tab, click on background color and set it to white. Then set the border color to black.
  3. Next, switch to the Format tab and choose Special from the Category list, and ZIP from the Special Options list.
  4. Click OK.
  5. Click and drag the field to the Spouse's Social Security Number field area.
  6. Type a plus sign to change the field name to SS.2. Now we will add a new type of field, the radio button. Radio buttons are used when we want to force users to make a choice. On our tax form, users have to choose whether to contribute to presidential election fund.

Step-by-step IV

  1. Draw a form field over the "Yes" box to the right of the election fund question.
  2. Name the field Pres.1.
  3. Make the type field type radio button.
  4. Click on the Options tab.
  5. Set the Radio Style to Circle and the export value to Yes.
  6. Click OK.

The next step is to duplicate the radio button, and to change its export value to "No."

Step-by-step V

  1. Make sure Pres.1 is still selected. Control-click to duplicate the field and drag it over the "No" checkbox.
  2. Double-click on the field.
  3. Click on the options tab and change the export value to No.
  4. Click OK.

Notice that we didn't change the field name. Why? Click the hand tool to return to normal mode. Click on Yes, then No. Notice that only one at a time can be selected. That's just the action we want here-there's no room for compromise. You either put a buck in the election kitty, or you don't.

Duplicate the fields with control-drag and rename them Pres.2 and to complete this section.

Up next is heart of the matter -- your income.

Step-by-step VI

  1. Draw a form field over the boxes to the right of line 1 of the income section.
  2. Name the field Income.1.
  3. Make the type field type text.
  4. Click on the format tab.
  5. Set the Category to number, the Decimal Places to two, and the currency symbol to Dollar.
  6. Click OK.

Use control-click and duplicate the field for income lines 2 and 3. Name the new fields Income.2 and Income.3.

So far, all data in this form must be entered by the user. To wrap up, we will create a new field that adds Income.1, Income.2 and Income.3.

Step-by-step VII

  1. Control-click Income.3 and drag it over the boxes to the right of income line 4.
  2. Double-click on the field to access its properties.
  3. Name the field IncomeSum.1.
  4. Click on the Calculate tab.
  5. Click on the "Value is the" radio button.
  6. Click on the "Pick" option and then add fields "Income.1, Income.2 and Income.3."
  7. Click Done and then OK.

That's it. You now have a form that accepts user data and performs simple calculations. Obviously, more can be done to this form, so feel free to experiment.

One last note on best practices: You may have noticed that each form field has an entry for "Short Description." The short description is the text that appears when a user holds the mouse over a form field [SEE EXAMPLE in the image above]. Although it is optional, it's a good idea to include short descriptions.

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Quick PDF Library

Get products to market faster with this amazing PDF developer SDK. Over 900 functions and an equally...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.