Nintex Save button without forcing Validations

Document created by wmuzzio on Oct 4, 2016Last modified by wmuzzio on Oct 4, 2016
Version 2Show Document
  • View in full screen mode

Hello Everyone,


Recently I was tasked with creating a form that has both "Save and Submit" and "Save" buttons. The "save" button is to be used to save the form without causing validation. When "save and submit" is selected it will cause validation and push the document to another workflow. As most of you know this is not an out of the box feature, when doing some digging I found a solution to this issue.


The solution I found to get around the validation issue on "Save" was to add a {return true} in the button's client click section.


When perusing the inspect element window I came across the "Save" button's OOTB onclick function.


  "if (!NWF.FormFiller.Functions.ProcessFormsValidation(this, 'NfValidationGroupctl00PlaceHolderMainformFiller', function () { })) { return false; };WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$PlaceHolderMain$formFiller$FormView$ctl102$3f616cae_5351_4996_be4f_f42e7b224857", "", true, "NfValidationGroupctl00PlaceHolderMainformFiller", "", false, false))"


What happens here is the form first checks validations, the field is set to false until it returns true, which will happen if the controls are valid. By adding a {return true} on the client click, it will override the Nintex OOTB validation check and submit as intended.


I hope this helps for those looking for a way to save something without running validations.


EDIT: After some more playing around with this solution I found that if you have fields set to required through SP, this will not work. This will only work if you have your validations on the form directly.

21 people found this helpful