Temporarily Disable Form Validation for New Records
Introduction
In some cases, you may want to disable form validation during record creation while keeping it active for record updates. This can be achieved by using a Bean Shell Load Binder. By adding a dummy section to your form and using a script, you can ensure that form validation is bypassed when the form is in add mode (such as when the primary key does not exist).
How does it work?
Follow these detailed steps to implement this functionality in your Joget forms:
- Add an empty or dummy section to your form. This section will be used to execute the script.
- Change the section's load Data Store to a Bean Shell Load Data Store and insert the following script. Use the Bean Shell script to disable form validation when the primary key is null (in add mode).