Tuesday, November 30, 2010

Creating form field tables



Building a table of form fields is a snap. The fields can be all the same type or different types, and the methods for creating a table vary slightly, depending on which case is true. To create a table made up of form fields that are all the same type, follow these steps:

1. Add a form field to your PDF in the area you want to serve as the corner of your table.

2. Hold down the Ctrl key (the Option key on the Mac) and draw a marquee around the single field to select it.
If you’re selecting one field only, it’s just as easy to click the field to select it. Using the Ctrl key (Option key on Mac) is better for selecting multiple fields and ensures you won’t create one big form field when what you really want is to make a multiple selection.

3. Choose Advanced➪Forms➪Fields➪Create Multiple Copies or rightclick the selected field and choose Create Multiple Copies on the context menu.
The Create Multiple Copies of Fields dialog box appears.

4. Specify the layout for your form field table by choosing options in the following areas of the Create Multiple Copies of Fields dialog box:
• Number of Fields: Use the spinner buttons or enter a value in the Copy Selected Fields Down or Copy Selected Fields Across text fields. If the Preview check box in the lower left corner of the dialog box is selected, all changes made in this dialog box are displayed for preview in the current document behind the dialog box.
• Overall Size (All Fields): Use the spinner buttons or enter a value in the Change Width or Change Height text fields to alter the size of the fields in your table. The default values in these fields reflect the size of the original field selected in the current document.
• Overall Position (All Fields): To move the entire table in the current document to a new position, click the Up, Left, Right, or Down buttons.

5. When you’re finished selecting options, click OK to close the Create Multiple Copies of Fields dialog box and view your form table in the current document.

To create a table made up of different field types, you need to vary the preceding steps slightly. Instead of creating a single field (as in Step 2), you need to create an initial row or column of different field types that will serve as a basis not only for the number of rows or columns that appear in your table but also for how the different field types will occur in the table. After establishing that, you then individually select and copy each field type in the Create Multiple Copies of Fields dialog box using the Copy Selected Fields Down or Across options, depending on the original location (at the head of a column or beginning of a row) of the selected field in the current document. Creating fields for tables in the manner just described is not the same as duplicating form fields. In this process, you give each field a unique name, which allows a higher degree of individual editing choices. Therefore, it’s not the method to use if you want to create a group of related radio buttons that must have the same name. See the “Understanding the Options tab” section, earlier in this chapter, for more on creating radio buttons. When your form is in the development stage and you’re beginning to accumulate a number of fields, it’s a good idea to take advantage of the Fields palette. Choose View➪Navigation Tabs➪Fields to display the Fields palette, as shown in Figure. The Fields palette is a floating navigation pane that provides a hierarchical, icon view of the fields in a PDF. It allows you to remotely select, rename, delete, edit the properties of, and more importantly, lock/unlock a field. Locked fields can’t be moved or edited, which comes in handy when you’ve gotten a number of fields just where you want them but are still fiddling with others in the form. To access these commands, right-click (Control+click on the Mac) a field icon in the Fields palette and choose the desired command from the context menu that appears. To lock/unlock a field, choose Properties on the context menu and select or deselect the Locked check box in the Properties dialog box that appears.

Setting Layout Grid Preferences



Acrobat 6 provides a wealth of tools that make the process of laying out and modifying form fields quick and easy. One of these tools is the Layout Grid —a non-printing, customizable on-screen grid that provides guidelines for drawing field boxes with the seven form field tools. To show or hide the Layout Grid, choose View➪Grid or press Ctrl+U (Ô+U on the Mac). The best part of the Layout Grid, however, is its Snap to Grid feature, which causes field boundaries to snap to gridlines when they’re being drawn, as shown in Figure. To turn this feature on or off, choose View➪Snap to Grid or press Ctrl+Shift+U (Ô+Shift+U on the Mac). Note that because these two features are discrete, the Snap to Grid feature will still work even if the Layout Grid is hidden and vice versa. A check mark next to either command’s name on the menu bar lets you know the feature is turned on.
Layout Grid preferences let you specify a grid’s spacing, position on a page, subdividing lines, and color. Choose Edit➪Preferences or press Ctrl+K (Ô+K on the Mac) to open the Preferences dialog box, and then click Units & Guides in the list box to display the options.
The following options are found in the Layout Grid area:
  • To specify the space between major gridlines, click the spinner buttons or enter a measurement in the Width and Height between Lines text boxes.
  • To offset the Layout Grid from the top-left corner of the page, click the spinner buttons or enter a measurement in the Grid Offset from the Left Edge or Grid Offset from the Top Edge text boxes.
  • To display a specified number of subdividing lines between major gridlines, click the spinner buttons or enter a number in the Subdivisions text box.
  • To specify the color of the gridlines, click the Grid Line Color button and select the desired color on the color palette (Windows) or the color picker dialog box (Mac) that appears.
When you’re finished selecting Layout Grid preferences, click OK to apply your changes and close the Preferences dialog box. You’ll probably find that the Layout Grid isn’t really very useful for adding fields to ready-made forms that you’ve scanned into Acrobat 6 because its gridlines will rarely match the cells that are already drawn in your paper form. In these cases, use the Align commands to keep your fields straight. Where it really makes sense to use the Layout Grid is in designing and building a form from scratch. Here’s a quick and easy method of getting a blank page into Acrobat 6 so you can use the Layout Grid to custom build a form: Open a new blank document in Microsoft Word (Windows or Mac) and click the Convert to PDF button on the PDFMaker 6.0 toolbar. You can open the resulting blank PDF in Acrobat 6, configure and display the Layout Grid, and then start cranking out a form of your own design.

Singling out the Signed tab

Options on the Signed tab apply only to the Signature field type. Its commands enable you to specify actions that occur in a form when data is entered into a blank signature field. You add signature fields to a form in the same manner as you do other form fields by using the Digital Signature tool. The Digital Signature tool creates a blank signature field that can
be filled out as part of completing a form.
To configure a blank signature field, click one of the three radio buttons on the Signed tab:
  • Nothing Happens When Signed: Use this default option if you don’t want any actions to occur to data entered in a field.
  • Mark as Read-Only: Provides a means of locking portions of a form at the time it is signed off in the signature field, in essence “freezing” the form at that moment in time. Select one of three items on the drop-down list: All Fields, All Fields Except These, and Just These Fields. If you select either of the latter two options, click the Pick button to open the Field Selection dialog box, where you choose the fields you want to render as read-only. Pick a field by selecting the check box next to the field name in the Mark Fields as Read Only list box. When you’re finished adding fields, click the OK button.
  • This Script Executes When the Signature Field Is Signed: Click this radio button to execute a specific JavaScript action when data is entered in a signature field. Click the Edit button to open the JavaScript Edit window. If you’re familiar with JavaScript languagBulleted Liste, you can write your own or copy and paste a predefined JavaScript in the script editing window. Click OK to close the JavaScript Edit window. The action script appears in a preview box below the radio button. Note that you can use the arrow keys to view the script, but you can’t edit it.

Sunday, October 31, 2010

Sizing up the Selection Change tab

The Selection Change tab provides you with the means to execute JavaScript actions when making a selection in the List Box field type. To use this feature, click one of the two radio buttons on the Selection Change tab:
  • Do Nothing: Use this option if you don’t want to run a JavaScript action when a user makes a list box selection.
  • Execute This Script: Use this option to attach an action, and then click the Edit button to open the JavaScript Edit window. If you’re familiar with JavaScript language, you can write your own or copy and paste a predefined JavaScript in the script editing window. Click OK to close the JavaScript Edit window. The JavaScript appears in a preview box on the Selection Change tab. Note that you can use the arrow keys to view the script, but you can’t edit it.

Wednesday, September 29, 2010

Cruising the Calculate tab

Like its Format and Validate tab brethren, options on the Calculate tab apply only to Combo box and Text field types. You use these commands to perform mathematical calculations on data entered in two or more form fields and display the result in another field. This feature is often used in an interactive order form where the product of an item’s quantity and price is automatically displayed in a total field. In addition, it’s possible to perform more advanced calculations using JavaScript.
To define the fields in a form that will perform calculations or attach a JavaScript calculation to a field, select one of the three radio buttons on the Calculate tab:
  • Value Is Not Calculated: The default state. Select this option if you don’t want to perform a calculation on data entered in a field.
  • Value Is the of the Following Fields: Provides a drop-down list of five operations: sum (+), product (), average, minimum, and maximum. Select an operation option and then click the Pick button to open the Field Selection dialog box, which displays a list of fields in your form. Select a field’s check box in the Select Fields for Calculation list box. You can select more than one field at a time, and you can select or deselect all the fields by clicking the appropriate button. When you’re finished selecting fields, click the OK button.
  • Custom Calculation Script: Click the Edit button to open the JavaScript Edit window. If you’re familiar with JavaScript language, you can write your own or copy and paste a predefined JavaScript in the script editing window. Click OK to close the JavaScript Edit window. The calculation script appears in a preview box below the Custom Calculation Script radio button. Note that you can use the arrow keys to view the script, but you can’t edit it.
By default, field calculations are performed in the same order as the form field’s tab order — that is, the order in which the fields are selected when the user presses the Tab key. This is not always a good idea, especially if your form contains multiple calculations where the result of one calculation depends on the result of another calculation. To override the default, set your own calculation order by choosing Advanced➪Forms➪Set Field Calculation Order to open the Calculated Fields dialog box. Select fields in the window and use the Up and Down buttons to arrange their calculation order, and then click OK to save your changes.

Viewing the Validate tab

Like the Format and Calculate tabs, options on the Validate tab apply only to Combo box and Text field types. You use these commands to restrict data entry in a field to a specific range, such as a dollar amount less than or equal to $1,000. Note that in order to specify a data range, the selected form field must be formatted with either the Number or Percentage category on the Formatting tab of the field type Properties dialog box.
You can accomplish more sophisticated validation, such as restricting data to specific values and characters, through the use of JavaScript. You might, for example, want to limit a date entry to only the years between 1950 and 2000 or allow a password that only contains three letters and four numbers separated by a dash.
To set a data range or attach a JavaScript to validate a field, click one of the radio buttons on the Validate tab:
  • Field Value Is Not Validated: The default state. This radio button is selected automatically if a field does not use number or percentage formats (selected on the Format tab). Otherwise, click this option if you don’t want validation applied to data entered in a field.
  • Field Value Is In Range: Provides two text boxes in which to define upper- and lower-range parameters. Type a number in the From or To field to specify limits on a data range.
  • Run Custom Validation Script: Click the Edit button to open the JavaScript Edit window. If you’re familiar with JavaScript language, you can write your own or copy and paste a predefined JavaScript in the script editing window. Click OK to close the JavaScript Edit window. The validation script appears in a preview box below the Run Custom Validation Script radio button. Note that you can use the arrow keys to view the script, but you can’t edit it.

Getting familiar with the Format tab


The commands on the Format tab are applicable only to Combo Box and Text field types. The same can be said of the Validate and Calculate tabs as well. These format options enable you to specify a particular numerical format for data entered in the form field. For example, you can create a text field for entering a Social Security number that must contain nine numbers and automatically places dashes after the third and fifth numbers.
The Format tab presents a list of format categories in the Select Format Category list box. Clicking a category displays specific options for that category in the Options area below the drop-down list. Choose formatting options and click OK to apply that formatting to your form field. The following list describes the categories and options provided on the Format tab:
  • None: The default setting that specifies that no formatting is applied to data entered in a field.
  • Number: Type a number in the Decimal Places field or click the attached spinner buttons to set the number of decimal places for the number entered in the text field. Use the Separator Style drop-down list to select a comma and decimal separators preference. Use the Currency Symbol drop-down list to select from a wide variety of foreign currency symbols. Select how negative numbers appear in a field by selecting the Show Parentheses or Use Red Text check box. (If neither check box is selected, negative numbers appear with a minus sign before the number.)
  • Percentage: Automatically displays the percent symbol with numbers entered in a Text or Combo Box type field. Type a number in the Decimal Places field or click the attached spinner buttons to set the number of decimal places. Click the arrow on the Separator to select a comma and decimal separators preference. The sample area provides a preview of your selected percentage options.
  • Date: Choose from a wide variety of date-only or date and time formats (choose the Time category for time-only formats) in the Date Options list box. The sample area below the Date options list box displays the format style of a selected formatting code. For example, selecting the formatting code m/d/yy in the Date Options list displays its format style as 4/19/03. When you’re familiar with these simple date and time formatting codes, you can select Custom at the bottom of the Date Options list box and create custom date and time formats in the text box provided.
  • Time: Choose from four time formats provided in the Time Options list or choose Custom to create your own. View the time format style for the selected time formatting code in the sample area below the list box.
  • Special: Choose from the list of five options that appear in the Special Options list: Zip Code, Zip Code+4, Phone Number, Social Security Number, or Arbitrary Mask, which is used to specify the types of characters a user can enter in any given position and how the data displays in a text field.
  • Custom: Provides a means of using JavaScript to format text or apply keystroke validation to text entered in a field. (See the next section to find out about field validation.) Click the Edit button next to either the Custom Format Script or Custom Keystroke Script area to open the JavaScript Edit window. If you’re familiar with JavaScript language, you can write your own or copy and paste a predefined JavaScript in the script editing window. Click OK to close the JavaScript Edit window. The keystroke or formatting script appears in its proper Custom Options area. Note that you can use the arrow keys to view the script, but you can’t edit it.