Hi, I have requirement to create a pagetype and Idea is that the page template will by default have a Kentico Form inserted on it.
Is there a way I can by default add a form to page when the page is created with my page type in Kentico 13? We don't want editors to add form on the page everytime they create page using this pagetype.
Thanks, Mahesh Kulkarni
You can use the "RenderStandaloneWidgetAsync" method in your view. See the following documentation: https://docs.xperience.io/developing-websites/page-builder-development/rendering-widgets-in-code
Thanks for helping out. when I try code I get error FormWidgetProperties does not exists in current context.
You need to include the following using for the FormWidgetProperties: @using Kentico.Forms.Web.Mvc.Widgets.
@using Kentico.Forms.Web.Mvc.Widgets
Thanks it helped me :)
Please, sign in to be able to submit a new answer.