Forms Scripting Order of Script Execution

The scripts specified in the form model are executed in a certain order during the different form life-cycle events.

Note: Errors in user-provided scripts are caught and logged at the error level at runtime and shown in the preview page logging area in the Form Designer.

The order of script execution is as follows:

When the Form is opened

  • Form Open event is published.

When the Submit button is clicked

  • Control validation scripts are executed.
  • Form Submit event is published.
  • Form Close event is published.

When the Close button is clicked

  • Form Close event is published.

When the Cancel button is clicked

  • Form Cancel event is published.
  • Form Close event is published.

When You Update a Control Value and Navigate out of the Control

  • Control Validation scripts are executed.
  • Control Exit event is published.
  • Control Update event is published.

For the events where the validation scripts are executed, no further steps proceed if any of the validations fail.