Pro Tip: Client Side Validation with Nintex Forms

24 May 2012

To use the custom validation in Nintex, in the control settings, provide a method name for your custom validation for that specific control:

Custom Validation Control

And then you need to provide an implementation of the custom validation method you've named - this isn't documented anywhere on their site yet so I got the answer through a support ticket, but essentially you need to provide a method with the same name you specified which takes two parameters, source and arguments. Here's the other half of the example with the JavaScript to validate a checkbox:

Validation Javascript

Note that:

  • normally, you're supposed to be able to use arguments.Value but it seemed to return blank for both checked and unchecked.
  • When using jQuery in Nintex Forms, use NWF$() instead of the standard $(), as a result of compatibility mode.
  • You can get the client ID (the large random-looking auto-generated ID provided by SharePoint) by specifying an name for Nintex Forms to store the client ID in, as part of Control Settings.

And that's all you need to do to get custom validation working for Nintex Forms :)

Tags: Javascript, Nintex Forms, SharePoint 2010, validation

Add a Comment

1 Comment