- Display a UI element (such as a checkbox) only for a specific IP range
- Validate the user's ZIP code according to your own custom logic
- Inject AJAX when a certain condition is met
- Respond in real time to the user's input
Common Use Cases:
- Event handlers for the screen-set.
- Adding custom validations to the screen-set.
Example of incrementing a counter inside the onFieldChanged event:
The following events are triggered by RaaS Screen-Sets.
- onError: called when an error occurs within the screen-set.
- onBeforeSubmit: called before a form is submitted. This event gives you an opportunity to perform certain actions before the form is submitted, or cancel the submission by returning "false".
- onSubmit: called when a form is submitted, can return a value or a promise. This event gives you the option of modifying the form data when it is submitted.
- onAfterSubmit: called after a form is submitted.
- onBeforeScreenLoad: called before a screen is rendered. This event gives you an oppotunity to cancel the navifation by returning "false".
- onAfterScreenLoad: called after a new screen is rendered.
- onFieldChanged: called when a field is changed in a managed form.
- onHide: called when a user clicks the "X" (close) button, or when the screen is hidden at the end of the flow.
- onBeforeValidation: called after a user submits a form, and before Gigya's built-in field and form validations. Can be used to add custom validations to the form (e.g., ZIP code validation).
For full details on these events, see accounts.showScreenSet.