Create the view
-
In the
Mvc/Viewsfolder, create a new CSHTML file and name itDefault. -
Open the
Default.cshtmlfile and add the following code:Razor@model SitefinityWebApp.Mvc.Models.CustomFormWidgetModel @using (Html.BeginForm("Submit", "CustomFormWidget", FormMethod.Post, new { id = "custom-dinner-request-form" })) { <div> @Html.LabelFor(m => m.Email) @Html.TextBoxFor(m => m.Email) </div> <div> @Html.LabelFor(m => m.FirstMeal) @Html.TextBoxFor(m => m.FirstMeal) </div> <div> @Html.LabelFor(m => m.SecondMeal) @Html.TextBoxFor(m => m.SecondMeal) </div> <div> @Html.LabelFor(m => m.Dessert) @Html.TextBoxFor(m => m.Dessert) </div> <div> <input type="submit" value="Submit your dinner request"> </div> }