cancel
Showing results for 
Search instead for 
Did you mean: 
wmuzzio
Nintex Newbie

Nintex Save button without forcing Validations

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.

Reply
12 Replies
Warwick
Nintex Newbie

Re: Nintex Save button without forcing Validations

Awesome investigative work, I'll certainly bookmark this one for future use.

Reply
wmuzzio
Nintex Newbie

Re: Nintex Save button without forcing Validations

Thank you! I hope you find it helpful.

Reply
adrianaprodan
Nintex Newbie

Re: Nintex Save button without forcing Validations

finally found the solution for this- i have been stuck for several days!

thank you so much

Reply
daniel_morgan
Nintex Newbie

Re: Nintex Save button without forcing Validations

Didn't work for me. The button still triggers validation(s).

0 Kudos
Reply
msine
Nintex Newbie

Re: Nintex Save button without forcing Validations

This didn't work for me either. Does this solution not work for Nintex Forms in SharePoint Online?

0 Kudos
Reply
daniel_morgan
Nintex Newbie

Re: Nintex Save button without forcing Validations

It doesn't work for me on Nintex Forms for SharePoint O365.

0 Kudos
Reply
msine
Nintex Newbie

Re: Nintex Save button without forcing Validations

Does anyone know if there is an alternative method for accomplishing this same solution in SharePoint Online? Any help would be greatly appreciated. Thank you.

0 Kudos
Reply
wmuzzio
Nintex Newbie

Re: Nintex Save button without forcing Validations

@Daniel Morgan

Are you on prem or online? 

0 Kudos
Reply
wmuzzio
Nintex Newbie

Re: Nintex Save button without forcing Validations

Hey All,

I am unaware of whether this will work on 365, we have on prem only, but will be moving to 365 in the future. So its good to know that another solution will need to be found.

My recommendation would be to go into the dom and follow the onclick function of the 365 button and see if you can manipulate the validation to force true.

0 Kudos
Reply