Setting a field with restrictionsAdded by IBM on January 17, 2014 | Version 1 (Original)
|When creating fields, you will often want to specify the kind of information that the user can type into the field. For example, you might want a field to accept only numerical values or set the field so that the user must fill it out.
This exercise guides you through setting up a field with restrictions.
Parent topic: Tutorial: Creating a simple form
- Copy and paste the Destination: label and field.
- Move the copied label and field under the Return Date: label.
- Change the name of the label to Estimated cost:
- Double-click on the field to open the Properties window.
- Click the check box for Required.
A check mark will appear in the box, signifying the label is now mandatory.
- Click the Format tab. Set the Type to Currency.
This action will set this field to only accept numerical entries. If a user attempts to enter letters, the field will remain blank.
- Click OK to apply changes and close the Properties window.
- Click File -> Save.
- Click the Viewer tab preview your work.
Note: Mandatory fields have a yellow background. If you type a character, nothing is entered in the field. If you type a number, and then tab out of the field, the number is displayed with a currency symbol. The background color is not visible in the design canvas, but will appear when you switch to the Viewer mode to preview and test the form.
- Click the Design tab to return to designing your form.