Form events reference
Form Studio includes a Groovy-based validation framework for form events. Form developers can specify groovy script validations on events such as loading and submitting forms.
Note: For instructions on creating scripts, see the Infor Workforce
Management Custom Scripting Developer Guide.
Form developers can use Groovy script validations to create these form events:
- On Load: An On Load event occurs whenever the user loads the form.
- On Validate: An On Validate event occurs whenever the user clicks to process the form or clicks on a multiple page form.
These API methods are available for Groovy script validations:
onLoad
: This validation is executed when the form is first loaded.onValidate
: This validation is executed when the form is submitted.getFieldValue
: This method can be used to retrieve a value of a given field by its name.setFieldValue
: This method can be used to set a value of a given field.setFieldErrorMessage
: This method can be used to set an error message to a given field by its name.Note: Field level error messages are displayed next to the field for which the error message occurs.addErrorMessages
: This method can be used to add a general (not applicable to any field in particular) error message that is displayed in a pop-up.