Create the custom event

You first create the interface with the properties of the custom form event. Next, you implement the interface that is passed to the event handler.

  1. Create the event with all the properties of the custom form event:
     
    using Telerik.Sitefinity.Services.Events;
    namespace SitefinityWebApp.Events
    {
    interface ICustomSubmitFormEvent: IEvent
    {
    string Email { get; set; }
    string FirstMeal { get; set; }
    string SecondMeal { get; set; }
    string Dessert { get; set; }
    }
    }
  2. Implement the interface that is passed to the event handler:
    namespace SitefinityWebApp.Events
    {
    public class CustomSubmitFormEvent : ICustomSubmitFormEvent
    {
    public string Email { get; set; }
    public string FirstMeal { get; set; }
    public string SecondMeal { get; set; }
    public string Dessert { get; set; }
    public string Origin { get; set; }
    }
    }

Was this article helpful?

Next article

Create the controller