Wednesday, September 29, 2010

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.

0 comments: