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.
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)
- This is something in C# that worked with the default SharePoint custom field types (https://msdn.microsoft.com/en-us/library/office/bb861799%28v=office.14%29.aspx)
- This worked in stopping submission but showed a default error page (“Sorry, something went wrong”) rather than giving the user an error message and allowing them to fix their number or PIN
- 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.