We’re working on a migration from v7 to v10. Part of that was migrating our grid content using uSync.Migrations which worked great for rich text and images, but one thing that’s not working is our grid form picker. I’ve tried following the documentation for forms front-end and rendering, but the form is still not displaying. I’ve created the block element doc type as well as the corresponding partial view, I’ve included that code below. Inserting a form through the rich text editor works, but how do you display a form in the block list?
@using Umbraco.Extensions;
@using Umbraco.Forms.Web;
@using Umbraco.Forms.Web.Extensions;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>
@Html.RenderUmbracoFormDependencies()
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.0.0.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.16.0/jquery.validate.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js"></script>
<div>
@await Component.InvokeAsync("RenderFormScripts", new {formId = @Model.Content.Value("form"), theme = "bootstrap3-horizontal"})
</div>
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/111826-render-forms-in-block-element