AnsweredAssumed Answered

Custom Control - Server Side Validation

Question asked by athompson on Apr 22, 2015
Latest reply on Aug 11, 2015 by dbaranyi

Hi Everyone,

 

We utilize a custom Employee Number + PIN validation for several different sign offs, and we need to incorporate this into our Nintex Forms.

 

We were successful in creating the custom control that is one single control with two fields by default: one field for the Employee Number and one for the PIN (picture of this attached).  Our main problem is figuring out how to validate this control (using our web service) and display a custom error message to our users.

 

We need to do this on the server side code and not with javascript or inline/runtime fuctions in order to avoid the possibility of using developer tools to get around the validation and submit the form without proper authentication of the PIN.

 

Here is what we have done so far:

  • Created a new control type using this guide: http://habaneroconsulting.com/insights/Leveraging-the-Nintex-Forms-Object-Model
  • Had it output two textboxes instead of just one so that we can accept two values (one for Employee #, one for PIN)
  • Tried to cancel submission of the form by throwing different types of Exceptions (regular Exception, a few Nintex defined exceptions)
  • Tried to add a validator on the CustomValidator property of the control
    • This is something that’s part of Nintex’s codebase
    • Couldn’t find any way of cancelling submission of the form gracefully

 

The crux of the issue is just getting the submission to stop and providing the proper error message. The two textboxes don’t have any impact on this either.

 

Any help is much appreciated!  Thank you.

Attachments

Outcomes