The Radio Button Creation Tool allows you to place radio buttons that can be used to display/edit the value of a form variable or a character field in the Job Manager database.
When a radio button is placed on a form, you specify the database field or form variable to which the button refers, the variable/field value the button represents, and the label that will be displayed on the form next to the button. For example, you may wish to allow a user to select one of three line screen options for a file: 133 lpi, 150 lpi, or 200 lpi. You would create three radio buttons on the form; each would correspond to the same "line screen" database field.
Note: Only Character or Memo fields can be assigned to Radio Buttons.
To create a radio button on a form:
1. Select the Radio Button Field Tool from the Tools Palette.
2. Move the pointer to the appropriate position, then click and drag to draw a radio button on the form. A new Radio Button box will appear in the form.
3. Select the newly drawn radio button on the form. The Control Palette is used to specify the database field that should be associated with the radio button and to specify additional field options.
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 value of the radio button 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.
If you want the value of the radio button 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.
5. In the Default value field, type a default value for the radio button by using a single MetaScript expression or writing multiple lines of code. For details on using MetaScript with radio buttons, please refer to the "Writing MetaScript for Database Fields and Variables" section.
If you want the value of the radio button 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.
IMPORTANT! When using multiple radio buttons bound to a single database field or variable, write MetaScript for only one of the radio buttons. Multiple scripts may produce unpredictable results.
6. Specify the appropriate options for the radio button. The following options may be specified:
Allow Editing---indicates whether users are allowed to change whether the radio button is selected.
Required---indicates whether the user is required to select one of the radio buttons corresponding to the database field before the record displayed in the form can be saved.
Visibility---indicates whether the radio button 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 in Job Manager).
7. Type the label and value you want to be used for the radio button in the appropriate fields. The label of a radio button is displayed next to the radio button on the form, while the value is saved as the value of the database field or form variable specified in Step 3 when the button is selected.
TIP: Depending on the format and design of the form you are creating, it may be advantageous to label the radio button using the Text Tool. This allows you to apply attributes to the radio button label that differ from those of the actual radio button itself (e.g. font, size, style, color, etc.). For details on using the Text Tool, refer to the "Creating Static Text" subsection.
8. Apply the appropriate attributes (style, size, font, color) to the new radio button field.
9. Repeat Steps 2-8 for each radio button that you want to associate with the database field/variable.
11. Select Save Form from the Form menu to save the changes you have made to the form.
At this point, new radio buttons have been added to the form. You can now continue drawing radio buttons or move on to the next type of form object you want to place on the form. For details on moving, resizing, copying, or pasting radio buttons, please refer to the "Working with Form Objects: Supported Actions" section.