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:
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.
Hi Amy Thompson!
I just figured out how to achieve this: you have to insert a CustomValidator control in addition to your textbox(es), and implement the ServerValidate event.
Something like this:
protected override void CreateFormControls()
TaxNumberTextBox = new TextBox();
TaxNumberTextBox.ID = "TaxNumberTextBox";
TaxNumberTextBox.Text = String.Empty;
TaxNumberValidator = new CustomValidator();
TaxNumberValidator.ControlToValidate = TaxNumberTextBox.ID;
TaxNumberValidator.ServerValidate += Validator_ServerValidate;
TaxNumberValidator.ErrorMessage = this.ControlSpecificProperties.ValidationErrorMessage;
TaxNumberValidator.Display = ValidatorDisplay.None;
TaxNumberValidator.ValidationGroup = this.FormValidationGroup;
void Validator_ServerValidate(object source, ServerValidateEventArgs args)
args.IsValid = args.Value != "1"; // logic should be implemented here
Hope it helps.