How can forms submissions be canceled? Below is the current code base that I am working from. I hooked into the form submission event for custom processing, but I need a way to cancel the form submission, if the custom validation fails.
private void FormsEvents_formSubmission(object sender, FormsEventArgs e)
{
if (!string.IsNullOrEmpty(e.FormsContent.Name))
{
var contentRouteHelper = ServiceLocator.Current.GetInstance();
var submitArgs = e as FormsSubmittingEventArgs;
// validation
//Process form
if(valid){
//todo
}else{
// cancel subimssion.
}
}
}
How can forms submissions be canceled? Below is the current code base that I am working from. I hooked into the form submission event for custom processing, but I need a way to cancel the form submission, if the custom validation fails.