If I understand correctly I think you need something like this on V10
var formGuid = "TheGuidOfYourFormFromAPickerOrSomething";
var yourThemeName = "NameOfYourFormsTheme";
@await Umbraco.RenderMacroAsync("renderUmbracoForm", new {FormGuid=formGuid, FormTheme=yourThemeName , ExcludeScripts="0"})
having ExcludeScripts ="0" or "1" depending on fi you want to have them included or if they are in your front end build.
Umbraco Forms not Rendering correctly in Umbraco 10.
Hi,
I am trying to update a .Partial View Macro Page from:
@inherits Umbraco.Web.Macros.PartialViewMacroPage
to @inherits Umbraco.Cms.Web.Common.Macros.PartialViewMacroPage @using Umbraco.Cms.Core.Models; @using ContentModels = Umbraco.Cms.Web.Common.PublishedModels; @inject Microsoft.AspNetCore.Http.IHttpContextAccessor HttpContextAccessor
But when I run the the following line of code
Html.RenderPartial("RenderForm", "UmbracoForms", new ViewDataDictionary(ViewData));
It says it can't find the view. The original code on version 8 of umbraco is
Html.RenderAction("RenderForm", "UmbracoForms", new {formId = form, recordId = recordGuid, theme = theme, includeScripts = true });
What the correct code I need to use,
HI Darren
If I understand correctly I think you need something like this on V10
having ExcludeScripts ="0" or "1" depending on fi you want to have them included or if they are in your front end build.
regards
Marc
Thank you
is working on a reply...