14. Creating Adobe PDF Files with Form Fields

Lesson overview

In this lesson, you’ll learn to do the following:

  • Set up a workspace for forms.

  • Add and configure various form field types.

  • Learn the differences between the types of form fields.

  • Use prebuilt form elements.

  • Set the tab order of form fields.

  • Add a Submit button to a form.

  • Export an Adobe PDF (Interactive) file with form fields.

  • Test your form in Adobe Acrobat Reader.

Image

This lesson will take about 45 minutes to complete. To get the lesson files used in this chapter, download them from the web page for this book at www.adobepress.com/InDesignCIB2020. For more information, see “Accessing the lesson files and Web Edition” in the Getting Started section at the beginning of this book.

Image

Adobe InDesign provides all the tools you need to create simple PDF forms, and you have the option of using Adobe Acrobat Pro DC to add features and functionality that aren’t available in InDesign.

Getting started

In this lesson, you’ll add several different types of form fields to a volunteer registration form, export an Adobe PDF (Interactive) file, and then open the exported file in Adobe Acrobat Reader and test the fields you created.

Image Note

If you have not already downloaded the project files for this lesson to your computer from your Account page, make sure to do so now. See “Getting Started” at the beginning of the book.

  1. To ensure that the preferences and default settings of your InDesign program match those used in this lesson, move the InDesign Defaults file to a different folder following the procedure in “Saving and restoring the InDesign Defaults file” on pages 45.

  2. Start InDesign. Choose File > Open, and open the 14_Start.indd file in the Lesson14 folder, located inside the Lessons folder within the InDesignCIB folder on your hard drive. This one-page document is a registration form.

  3. To ensure that the panels and menu commands match those used in this lesson, choose Window > Workspace > [Interactive For PDF], and then choose Window > Workspace > Reset Interactive For PDF.

    Image Note

    If an alert informs you that the document contains links to sources that have been modified, click Update Modified Links.

  4. To see what the finished document looks like, open the 14_End.indd file in the Lesson14 folder.

  5. Close the 14_End.indd file after you have finished examining it, or you can leave this document open for reference.

    Image
  6. Return to the 14_Start.indd file and choose File > Save As, rename the document 14_PDF_Form.indd, and save it in the Lesson14 folder.

    Image Note

    The screen captures in this book show the Medium Light interface. Interface elements such as panels and dialog boxes will be darker on your screen if you are using the default interface.

Setting up a workspace for forms

When creating a fillable form with InDesign, you’ll start with a page that has already been designed. The step of taking a designed form and turning it into a form that can be filled out in a PDF uses specific tools. The Interactive For PDF workspace has many of the tools you’ll need readily available. If you customize the workspace a little, you will be more efficient.

  1. First, drag panels off the panel dock that are not needed for forms: Page Transitions and Bookmarks. Drag each panel to the left over the pasteboard. These panels are useful for other types of interactive PDFs but are not needed for forms. Also drag the Links, Color, and Gradient panels to the pasteboard, as they won’t be used for forms. You’ll be adding form functionality to a document that is already designed and built. It doesn’t matter if some of the panels dock together as you drag them.

  2. Close each of the panels you just dragged off the panel dock.

    Image
  3. Drag the Sample Buttons And Forms panel under the Buttons And Forms panel. This InDesign library includes prebuilt form fields as well as buttons for check boxes, radio buttons, and buttons that can be used to submit or print a form.

  4. Choose Window > Properties to open the Properties panel. Then drag it to the bottom of the panel dock so that you can open and close it as needed while conserving screen space.

  5. Save this workspace so you can use it again. Choose Window > Workspace > New Workspace. Use a name like PDF Forms-Basic or whatever makes sense to you. (For more complicated and long forms, you might want to save a separate workspace with additional tools, including the Paragraph Styles, Character Styles, Object Styles panels, and Articles panels.) Click OK.

Adding form fields

Some of the setup work on the form fields has already been done. You’ll complete the form by adding more fields and then modifying some of them.

Adding text fields

In a PDF form, a text field is a container into which the person who fills out the form can enter text. All but two of the frames have already been converted into text fields. You’ll add two new frames and convert them into text fields.

Image Note

You can simplify the display of the page by hiding Layer 1 in the Layers panel. Only the objects in the form area are displayed when you hide Layer 1.

  1. Open the Layers panel by clicking the icon () in the panel dock. Notice that the file is set up with a separate layer, Form Elements, for the objects that are part of the form. Lock the other layer, Layer 1, so that you can work with the form objects without accidentally moving anything else.

  2. Use the Zoom tool () to zoom in on the area in the top half of the page that contains the form objects. This is where all of your work in this lesson will be done.

  3. Using the Selection tool (), move the pointer over the text field below “First Name.” Notice that a red dotted line is displayed around the object and a small icon is displayed at the lower right. The dotted line indicates that the object is a PDF form element; the icon of the text frame indicates that the type of PDF form element is a text field. Click in the text field to select the object.

  4. Click the Buttons And Forms icon () in the panel dock to display the Buttons And Forms panel. Notice the settings for the text field. Text Field is selected in the Type menu, and the name of the element is First Name. The Description field is displayed to the form user when the pointer rolls over a field so that you can provide additional guidance to users who fill out a form. The Description field is also set to First Name. Printable is selected by default to enable printing of this form. Leave the font setting and size at the defaults.

    Image

    Different types of form fields have different icons in the lower-right corner. This is a text field icon.

  5. Select the frame of the First Name form field, press Alt (Windows) or Option (macOS), and drag a copy of it below Last Name. Resize the field to make it longer, aligning it with the fields below, by dragging the center-right handle to the right. The Smart Guides will appear when the pointer is aligned.

  6. In the Buttons And Forms panel, notice that the name of this field is First Name 1. This is an InDesign behavior you should be aware of when creating forms: no fields can have the same name. InDesign enforces this rule by adding sequential numbers to the name of duplicated fields. To make this a unique field with the correct information, change both the Name and Description fields to Last Name.

  7. To create a field from scratch, choose the Rectangle tool () in the Tools panel and draw a frame under the Email Address text frame. Align the right edge with the City frame above and the top edge with the bottom of the Email Address text frame. Use the Smart Guides to make the frame the same height as the City frame. You can convert any kind of frame—text, graphics, or unassigned—into a PDF form field. A text field does not have to be made from a text frame.

    Image

    Notice how the Smart Guides help you align and size objects.

  8. Now we will assign the same fill and stroke as the other text fields. An object style for the text field boxes has already been created for this lesson. Choose Window > Styles > Object Styles to open the Object Styles panel. Choose the Selection tool (), and click the box you just drew if it’s not still selected. Click the object style called Text Field Box, and then close the Object Styles panel. The same fill and stroke have now been applied to the new frame. Next, make the text field the same height and width as the City field by dragging the rectangle handles slightly. Watch for the Smart Guides to display again. The size has changed slightly because the object style added a stroke to the frame. Confirm that the size of the field is the same as the City field by checking the measurements in the Control or Properties panel.

    Image Note

    Whenever you add a stroke to a frame, you can set the stroke to align to the center, outside, or inside of the frame edge. The center and outside options change the height and width measurements of the frame.

  9. In the Buttons And Forms panel, choose Text Field from the Type menu, and assign it the name and description Email Address. Set Font Size to Auto. Auto is a good choice for fields such as email addresses that can be very long; the setting decreases the font size as needed to fill the frame. This functionality prevents any text being from clipped off when the page is printed.

  10. Choose File > Save.

Adding either/or choices: radio buttons

Radio buttons present the person filling out the form with two or more choices, but only one choice can be selected as the response. A group of radio buttons functions as one field, with a unique value for each button. Check boxes can appear similar to radio buttons, but every check box in the list can be either on or off.

Image Note

Use a radio button for either/or (mutually exclusive) choices when the user must specify a status that can have only one answer—for example, whether they are a member, non-member, or student member of an organization.

Radio buttons are often simple circles; however, you can design your own buttons or choose from several sample buttons included with InDesign. In this exercise, you’ll use one of the sample radio buttons. The prebuilt buttons in this library are vector shapes with various attributes for fill, stroke, and effects.

  1. Choose View > Fit Page In Window, and then use the Zoom tool () to magnify the “In what way are you best able to help?” portion of the form.

  2. Click the Sample Buttons And Forms icon () that you dragged below the Buttons And Forms icon () in the panel dock to open the Sample Buttons And Forms panel.

  3. Using the Selection tool (), drag the radio button group named “016” from the Sample Buttons And Forms panel and position it below the text frame with the text “In what way are you best able to help?” Close the panel by clicking the double arrows () at the upper right of the panel. Align the top of the topmost radio button with the top of the line of text to the right. Refer to the following figure for the correct position.

  4. In the Control or Properties panel, make sure that the upper-left reference point is selected in the reference point locator (), enter 40% in either of the Scale Percentage boxes, make sure that the link for the Same Settings icon () is selected, and then press Enter or Return. If necessary, move the buttons to match the following figure.

    Image
  5. With all three buttons still selected, in the Buttons And Forms panel enter Form of Assistance in the Name box and In what way are you best able to help? in the Description box, and then press Enter or Return. Notice that Type is already set to Radio Button.

  6. Choose Edit > Deselect All, or click an empty area of the page or pasteboard.

  7. Use the Selection tool () to select the first radio button (to the left of Education).

  8. At the bottom of the Buttons And Forms panel, enter Education in the Button Value field, and then press Enter or Return. Under Appearance, scroll to the top and click [Normal Off]. Make sure that Selected By Default is unselected.

    Image

    Image Note

    The states listed under Appearance in the Buttons And Forms panel control the look of the radio buttons in the form when you move the pointer over the button.

  9. Repeat steps 7 and 8 to change the Button Value setting of the middle button to Garden maintenance and of the bottom button to Financial donation. Notice that the name of the field is the same for all three buttons; only the Button Value changes. The second and third buttons should already be set to the state [Normal Off] in the Appearance section.

  10. Choose File > Save.

Adding yes or no choices: check boxes

A check box presents a yes-or-no choice for an individual item. A user of the form can click the empty check box (the default setting in the exported PDF) to add a check mark or leave it unselected. Now you’ll add a check box.

Image Note

Use a check box when a question can be followed by “check as many as apply.” For example, a training school might ask, “Which programs are you interested in?” and then list several, such as InDesign, Photoshop, Illustrator, and Acrobat. The person filling out the form could be interested in more than one.

  1. Open the Sample Buttons And Forms panel () again. Use the Selection tool to drag the check box named “002” to the left of the text frame that contains “Yes, I would like to receive your quarterly newsletter,” which is just below the radio buttons you created in the previous exercise. Align the check box so that the top of the check mark frame aligns with the top of the text frame.

  2. Press Shift+Ctrl (Windows) or Shift+Command (macOS) and scale the check box graphic so that it is the same height as the text frame to the right.

    Image

    Check box after being scaled.

  3. Click the Buttons And Forms icon () in the panel dock to open it. At the same time, the Sample Buttons And Forms panel closes. Enter Receive Newsletter in the Name field, and then press Enter or Return. Notice that Type is already set to Check Box. Under Appearance, click [Normal Off]. In the Description field, enter Check here if you’d like to receive our newsletter. Deselect Selected By Default.

    Image Note

    Panels from the panel dock close automatically when you click a different panel in the panel dock. You don’t have to close one panel before opening another.

    Image
  4. The check box and radio buttons that you dragged from the Sample Buttons And Forms panel will have red highlights because they are on the Form Elements layer. Items that you drag from the library are added to the active layer. As you work on any form, it’s a good practice to check that elements are on the layer where they belong. Doing so helps keep your work organized and becomes especially important when you work on complicated forms. Select all the buttons you dragged from the library with the Selection tool () and open the Layers panel (). If the new items are not on the Form Elements layer, correct this by dragging the square in the Layers panel to the Form Elements layer.

    Image Note

    Layer 1 should already be locked, so the new objects should be on the correct layer.

  5. Choose File > Save.

Adding a list of choices: combo box

A combo box creates a menu that lists multiple predefined choices. The user can select only one of the choices. Next, you’ll create a combo box that offers three choices.

Image Note

List boxes are similar to combo boxes in that you add list items; however, combo boxes allow you to select only one item from a list in the PDF form. If you select Multiple Selection for a list box, a user of the PDF form can make more than one choice.

  1. Use the Selection tool () to select the text frame below the heading “Please send me your newsletter in the following format:.”

  2. In the Buttons And Forms panel, choose Combo Box from the Type menu, and then enter Newsletter Format in the Name field. In the Description field, enter Choose which way you’d like to receive our newsletter. Change Font Size to 10. To provide the viewer of the PDF form with different choices, you’ll add three list items.

  3. In the lower half of the Buttons And Forms panel, in the List Items box enter Print Publication: Standard Mail, and then click the plus sign () to the right of the box. Notice that the text you entered is now displayed in the list below the box.

    Image Tip

    To sort list items alphabetically, select Sort Items in the Buttons And Forms panel. You can also modify the order of list items by dragging them up or down in the list.

    Image
  4. Repeat the previous step to add Adobe PDF: Email Attachment and Link to online newsletter: Email to the list. Select the Sort Items option to sort list items alphabetically.

    Image Tip

    To display a combo box without a default selection, make sure that none of the list items is selected. When a list item is selected, it becomes the default selection when the PDF is opened.

  5. Click Print Publication: Standard Mail in the list of items to make it the default selection. When a viewer opens the exported PDF file, Print Publication: Standard Mail will already be selected.

  6. Choose File > Save.

Setting the tab order of the fields

The tab order you establish for a PDF form determines the order in which fields are selected as a user presses the Tab key. To make the form user-friendly, the order must be logical to the user. You would not want the tab to move from First Name to ZIP and skip the fields in between. Next, you’ll set the tab order for the fields in this form.

  1. From the Object menu, choose Interactive > Set Tab Order.

  2. In the Tab Order dialog box, click Last Name (the name of the text field you created that holds the surname of the person filling out the form), and then click Move Up until Last Name appears below First Name near the top of the list. Use the Move Up and Move Down buttons or drag field names up or down to rearrange them to match the order on the page. Click OK to close the dialog box.

    Image
  3. Choose File > Save.

Adding a button to submit the form

If you distribute a PDF form, you’ll want to include a way for anybody who fills out the form to return it to you electronically. To accomplish this, you’ll create a button that sends the filled-out PDF form to your email address.

Image Tip

Any object or group can be converted into a button. The example in this lesson is a text frame with a fill color and the text “Submit.” To convert a selected object or group into a button, choose Button from the Type menu in the Buttons And Forms panel.

  1. Use the Selection tool () to select the rounded-corner text frame with a red fill and the text “Submit.”

  2. In the Buttons And Forms panel, choose Button from the Type menu, enter Submit Form in the Name field, and then press Enter or Return. In the Description field, enter Send the completed form via email.

  3. Click the plus sign () to the right of Actions: (Add New Action For Selected Event) and then choose Submit Form from the menu.

  4. In the URL field, enter mailto:. Make sure you enter a colon after “mailto.” Do not enter a space or a period before or after the colon.

  5. Enter your email address (for example, [email protected]) after mailto:. This will return the completed form to you.

  6. To cause the button’s appearance to change when a user moves the pointer over the Submit button, you’ll add a Rollover appearance.

    Image Tip

    A button’s appearance can have three different states. The state that’s displayed depends on the user’s interaction. The Normal state is the default display when no interaction occurs, the Rollover state displays when the pointer is over the button, and the Click state displays when the mouse button is clicked.

    Click [Rollover] in the Appearance section of the Buttons And Forms panel. Use the Swatches, Control, or Properties panel to select Fill color () and enter 50 in the Tint field. Press Enter or Return, and then close the panel.

  7. Return to the Buttons And Forms panel. Notice that the [Rollover] appearance is now lighter than the [Normal] appearance, reflecting the tint change you just made. Click [Normal] to display the default appearance.

    Image

    Image Tip

    If you don’t want the Submit button itself to appear on a printout of the form, disable the Printable option in the Buttons and Forms panel for the button.

  8. Open the Layers panel by clicking the icon () in the panel dock or choose Window > Layers and make sure all layers are visible (in case you hid Layer 1 earlier in the lesson).

  9. Choose File > Save.

Exporting an interactive Adobe PDF file

Now that you’ve finished work on the form fields, you’re ready to export an interactive Adobe PDF file and then test the exported file.

Image Note

You may not need to enter a filename because the default behavior is to name the exported file with the name of the InDesign file. That means the PDF name may automatically be 14_PDF_Form.

  1. Choose File > Export. In the Export dialog box, choose Adobe PDF (Interactive) from the Save As Type menu (Windows) or Format menu (macOS). Name the file 14_PDF_Form.pdf and save it to the Lesson14 folder, located inside the Lessons folder within the InDesignCIB folder on your hard drive.

  2. Click Save. The Export to Interactive PDF dialog box opens.

  3. In Export To Interactive PDF dialog box click the General tab. In the Options section, make sure that Include All is selected for Forms And Media. This is the most important setting to make the form fields work in the PDF.

    Image
  4. Choose Fit Page from the View menu to display the entire page when the exported PDF is opened. Make sure the View After Exporting option is selected and leave all other settings unchanged. Click Export. The PDF will open in Acrobat or Acrobat Reader when it finishes exporting.

    Image Note

    In many scenarios where you’ll create a form, you’ll need to complete the Title, Author, Subject, and Keywords fields. You do so in Acrobat after the file is exported from InDesign. In Acrobat, choose File > Properties and then click the Description tab to fill out these fields.

Testing your form in Acrobat Reader

You should always test your forms in Acrobat Reader because the end user is most likely to use that version of Acrobat when filling out the form. If you do not have Acrobat Reader, install it now. The current version is Adobe Acrobat Reader DC. It’s a free download at https://get.adobe.com/reader.

Image Note

If you have Acrobat Pro DC as part of your Creative Cloud subscription, that is the professional version of Acrobat, which most users of the form will not have.

  1. Open Acrobat Reader and open the PDF you just exported. First, click in the First Name field and press the Tab key. Continue to tab through all the fields to make sure that the tab order is correct. Fill out the fields with sample information.

  2. Next, click the radio buttons under “In what way are you best able to help?” and notice that you can make only one choice at a time.

  3. Click the box beside “Yes, I would like to receive your quarterly newsletter” to see that the check mark turns on. Then choose one of the newsletter formats from the drop-down menu below.

  4. Move the pointer across each field, pausing for a moment, and notice the tips that appear. These are the descriptions that you entered in the Buttons And Forms panel for each field.

    Image

    If you find any errors, go back to the InDesign file and fix them. Then export and test again.

  5. When you’re done, click the Submit button that emails the filled-out form to you. A dialog box will open asking which email program you want to use. Make your choice and then click Continue. Your email software will open with the filled-out form attached to a new message. Send the form and then return to InDesign.

    Image Note

    A security warning dialog box may display when Acrobat creates an email message with the completed form as an attachment. Click Allow.

  6. Look at the email you received and notice the subject line: Form Returned: 14_PDF_Form.pdf. This is a default function of the Submit Form action of the Submit button. Therefore, it’s important to consider the name of the PDF when you create forms to be emailed.

Congratulations! You’ve created a PDF form and tested it.

Exploring on your own

  • Open a new document, create a text frame, and then use the Buttons And Forms panel to convert the text frame to a signature field. A signature field in a PDF form lets the user apply a digital signature to the PDF file. Assign the field a name, and then export an Adobe PDF (Interactive) file. Open Acrobat Pro DC or Acrobat Reader DC to test the signature field by clicking it and then following the onscreen instructions to create a digital signature. Click Cancel if you see a dialog box about trusted certificates. They are part of a system of securely identifying signatures, which is not needed for creating a simple signature.

  • Use the Ellipse tool () to create a small circular frame. Use the Gradient panel to fill the circle with a radial gradient; the Swatches panel to change the colors of the gradient; and use the Buttons And Forms panel to convert the frame into a button. Assign the button the Go To URL action and enter a complete URL in the URL field (for example, http://www.adobe.com). To test this button, export an Adobe PDF (Interactive) file and click the button.

  • Experiment with one of the other prebuilt form fields in the Sample Buttons And Forms panel. Drag one onto the page, and then view its properties in the Buttons And Forms panel. Try different modifications to its appearance, change some of its properties, or both. Export and test the result.

Review questions

1. What panel lets you convert an object into a PDF form field and specify settings for form fields?

2. What is the difference between a radio button and a check box?

3. What action can you assign to a button that enables a viewer of the exported PDF form to send a copy of the filled-out form to an email address?

4. What programs can be used to open and fill out an Adobe PDF form?

5. What are the two most important things to do when exporting your InDesign file to create a fillable PDF form?

6. How do you control the order in which a user can tab through the fields when filling out a form?

Review answers

1. The Buttons And Forms panel (Window > Interactive > Buttons And Forms) lets you convert objects into PDF form fields and specify settings for them.

2. Radio buttons are for questions that have an either/or answer; the user of the form can choose only one. Check boxes are either checked or not checked individually. So, a question for which the user can choose more than one answer needs a check box, not a radio button. Check boxes can also be used for questions whose answer is a simple yes if the box is checked.

3. To enable the viewer of a PDF form to return a filled-out form, use the Buttons And Forms panel to assign the Submit Form action to the button. After you assign the Submit Form action, enter mailto: followed by an email address (for example, mailto:[email protected]) in the URL field.

4. You can open and fill out PDF forms using Acrobat Pro DC or Acrobat Reader DC.

5. First, in the Export dialog box, choose Adobe PDF (Interactive) from the Save As Type menu (Windows) or Format menu (macOS). Then in the Options section of the General tab, make sure that Include All is selected for Forms And Media.

6. From the Object menu, choose Interactive > Set Tab Order. Then move the field names up or down so that they follow the visual order that the user will see.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.234.177.119