Create the model
-
In the
Mvc/Modelsfolder, create a new class and name itCustomFormWidgetModel. -
Open the
CustomFormWidgetModel.csfile and add the following form properties:C#using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace SitefinityWebApp.Mvc.Models { public class CustomFormWidgetModel { [Required] [DisplayName("Email")] public string Email { get; set; } [Required] [DisplayName("First meal")] public string FirstMeal { get; set; } [Required] [DisplayName("Second meal")] public string SecondMeal { get; set; } [Required] [DisplayName("Dessert")] public string Dessert { get; set; } } }