public ActionResult Render(ConfiguredFormInfo form) { var viewModel = new FormViewModel() { FormDefinition = DefinitionHelper.GetFormDefinition(form.FormId), LayoutDefinition = DefinitionHelper.GetLayoutDefinition(form.LayoutId), TemplatePath = DefinitionHelper.GetTemplatePath(form.TemplateId), PageId = CurrentPage.Id }; return(PartialView("~/Views/Partials/Formulate/RenderForm.cshtml", viewModel)); }
public static Models.ContactUsContent ObtainContactUsContent(ContentModels.ContactUs cmModel, HtmlHelper Html) { //Instantiate variables Models.ContactUsContent PgContent = new ContactUsContent(); //Obtain page summary PgContent.ContactSummary = Html.Raw(umbraco.library.ReplaceLineBreaks(cmModel.ContactSummary)); //Obtain the form and its view model ConfiguredFormInfo pickedForm = cmModel.GetPropertyValue <ConfiguredFormInfo>("formPicker"); PgContent.Vm = formulate.api.Rendering.GetFormViewModel(pickedForm.FormId, pickedForm.LayoutId, pickedForm.TemplateId, cmModel); return(PgContent); }