diff --git a/Add-ons/UmbracoForms/Developer/Extending/Adding-an-Event-Handler.md b/Add-ons/UmbracoForms/Developer/Extending/Adding-an-Event-Handler.md index 49e407fa5b4..8059efe80e0 100644 --- a/Add-ons/UmbracoForms/Developer/Extending/Adding-an-Event-Handler.md +++ b/Add-ons/UmbracoForms/Developer/Extending/Adding-an-Event-Handler.md @@ -37,13 +37,13 @@ namespace MyFormsExtensions } // A sample validation - var email = GetPostFieldValue(notification.Form, "email"); + var email = GetPostFieldValue(notification.Form, notification.Context, "email"); var emailConfirm = GetPostFieldValue(notification.Form, notification.Context, "verifyEmail"); // If the validation fails, return a ModelError if (email.ToLower() != emailConfirm.ToLower()) { - notification.ModelState.AddModelError(GetPostField(e, "verifyEmail").Id.ToString(), "Email does not match"); + notification.ModelState.AddModelError(GetPostField(notification.Form, "verifyEmail").Id.ToString(), "Email does not match"); } } } @@ -182,4 +182,4 @@ When an entry for a form is rendered in the backoffice, and event is available t notification.EntrySearchResult.Fields = transformedFields; } } -``` \ No newline at end of file +```