Joget DX Preview Release Available for Download

Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
//the following will return false (hash not empty against empty string) if "save as draft" button is clicked on form submission, othwerise, it will return true (form loading)
return "#requestParam.saveAsDraft?java#".equals("");

When "Save As Draft" button is clicked, the hash variable in the code above will be parsed as "Save As Draft", thus making the equals function return false. In a permission plugin implementation, by returning false, the form fields inside its section will no longer be considered applicable for validation (executing its form validators) and saving (executing form store binder).

The same script can also be placed in the subform's form section permission, or in the subform's form permission too.