APPLICATION DESIGN
Input Enabled appears in the Object list of the Programmer's Pane for all field types except rich text and rich text lite.
1. Create an editable field.
2. Select Default Value or Input translation from the Object tab of the Info List.
3. Write one of the following in the Script area of the Programmer's pane:
To enter a literal text string, enclose it in quotation marks (" "). Field names don't need quotation marks.
If you select the form property "On Create: Formulas inherit values from selected document" when designing the form, use the default formula to specify the field from which this new field inherits its value. When a new document is composed with this form, the field value is copied from the document that is currently highlighted if that document contains the specified field.
An alternative to an input translation formula is to write a script for the Exiting event that verifies information.
To create an input validation formula
2. Select the Input Validation event from the Objects tab of the Info List.
3. Write a formula in the Script area of the Programmer's pane using @Failure and @Success.
4. Click the green check mark to save the formula.
@Failure prevents the user from saving the document until the user enters a value that meets the criteria. As part of the formula, include text that clearly indicates what is wrong and how the user can correct it.
See Also