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

Checkbox form validation

Jump to solution

On my SharePoint Nintex form, I'd like to validate that a checkbox field has been checked when the item is being saved.

Here's my scenario:

- I have a SharePoint list with a Yes/No column "Agreement"

- On the form, I use Custom validation for the control:

ControlSettings.PNG

- My custom validation script checks if the control is checked:

FormSettings.PNG

My issue and question is this:

-- The function always returns the "false" condition, whether the checkbox is checked or not.  The script function is very simple, so I must have the syntax wrong, or am overlooking something basic.  Any suggestions to resolve this would be greatly appreciated!

error.PNG

Labels: (3)
0 Kudos
Reply
2 Replies
mapeacock
Nintex Newbie

Re: Checkbox form validation

Jump to solution

Hi Terri,

On your check box settings, you need to go into advanced settings and select "Store Client ID in Javascript variable".

Then type a new name for a javascript variable - mine here is "vAgreement". Then in your Form Custom javascript, instead of inserting the Reference Agreement, insert vAgreement. (see bottom screenshot)

This should get you out of trouble. Of course the newer versions of Forms have the added ability to apply a Validation rule as you would a Formatting rule. Much easier than playing around with the javascript.

Cheers,

Mark

Reply
ndterri
Nintex Newbie

Re: Checkbox form validation

Jump to solution

Hi Mark,

Your resolution worked like a charm!! Thank you!

Terri

Reply