The Field Creation Tool allows you to create rectangular text entry fields whose contents correspond to the value of a form variable or a field in the database.
A text entry field can correspond to all types of database fields except for file collection and thumbnail fields. You may place a text field on a form to allow users to type in job due dates, comments, special instructions, quantities, etc.
To create a text entry field on a form:
1. Select the Text Field Creation Tool from the Tools Palette.
2. Move the cursor to the appropriate position, then click and drag to draw a text entry field on the form.
3. Select the field. The Control Palette will allow you to specify the database field whose value the text field will display. Additional field options may also be specified.
4. Click the Field expander button and select the appropriate database field. The database fields available will depend on the record type on which the form is based. The Field expander button also allows you to define the contents of the text field as a form variable which may be used in performing calculations on the form. For details on defining and using variables, please refer to the "Creating Form Variables" section.
5. In the Calculate As/Default Value field, type a default/calculated value by using a single MetaScript expression or by writing multiple lines of code. For details on using MetaScript with text entry fields, please see "Writing MetaScript for Database Fields and Variables" on page 443. If you want the value of the text entry field to take on the value of a database field, click the MetaScript editor button and select the appropriate database field by using the Database Field button (
) in the MetaScript editor window. If a non-editable database field was selected in the previous step, the default value field will not be available.
Note: The default value will be used to automatically populate the database field bound to the text entry field when a new record is added to the database. If no default value is specified, the value of the database field will be undefined.
Specify the appropriate options for the text entry field. The following options may be specified in the Control Palette:
Allow Editing---indicates whether users are allowed to edit the information displayed in this field.
Required---indicates whether the user is required to enter information in this field before the record displayed in the form can be saved.
Visibility---indicates whether the text field will be always shown, always hidden, shown in print (only when the form is printed), or shown in display (only when the form is viewed).
Scrolling---indicates whether the text field should have a scrollbar that will allow users to scroll within this field.
6. Apply the appropriate attributes (style, size, font, color, line width, alignment) to the new text entry field.
7. Select Save Form from the Form menu to save the changes you have made to the form.
At this point, a new text entry field has been added to the form. You can now continue adding text fields or move on to the next type of form object you want to place on the form. For information on moving, resizing, copying, or pasting text fields, please refer to the "Working with Form Objects: Supported Actions" section.