Form Events
Last updated
Last updated
The Form Events
block is used to handle various events related to a form.
You can implement any supplemental validation or input correction tasks here.
Please note that you cannot execute a background task and wait for it's completion here.
Please note that you cannot execute a background task and wait for it's completion here.
Please note that you cannot execute a background task and wait for it's completion here.
This block only works when used in Form type pages. See to learn about how forms work.
The block consists of Init Tasks, Pre-Validate Tasks, Post-Validate Tasks, Submit Tasks, Success Tasks and Error Tasks which are discussed below.
The Init Tasks , is used to implement logic during the initialization process of the form.
If you plan on adding logic that takes time to complete (i.e. executes in the background), we recommend locking the form using the block and unlocking when the task is complete.
The logic in the Pre-Validate Tasks is invoked after the user clicks the submit button or when the is executed without a valid data object attached its . This occurs prior to Zingy's automatic field input validation process.
Use the or blocks to retrieve the values entered by the user.
For any input corrections use the or blocks to set the value.
Use the block by setting its to OK for continuing with the processing, or ERROR to stop further processing.
You may also use the to report any specific error message to the user.
The logic in the Post-Validate Tasks is invoked after Zingy's automatic field input validation process but prior to the submission of the form's data.
To access the data entered by the user, use the block for both retrieving and setting the values of the fields. At this stage, avoid using the or blocks since the system has already progressed beyond the point of reading field input values.
Use the block by setting its to OK for continuing with the processing, or ERROR to stop further processing.
You may also use the to report any specific error message to the user.
The logic in the Submit Tasks is invoked only in the case of custom forms (where no database table is attached).
Implement your own form data submission or processing logic here. You can access the form's data using the block.
Once you are done processing or submitting the data, use the block for the system to proceed with the next step.
Refer to the block for an example.
The Success Tasks allows you to execute logic when the form's data has been submitted successfully.
You can use the block to retrieve the data that was submitted.
You may also use the to report any specific message to the user. This will override the form's success message.
The Error Tasks allows you to execute logic when there was an error in submitting the form's data.
You can use the block to retrieve the data entered by the user..
You may also use the to report any specific message to the user. This will override the form's error message.