Checkbox form validation

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:

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

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!

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.

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.