How to render and show a form in a custom MVC control? - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to render and show a form in a custom MVC control?

  • How to render and show a form in a custom MVC control?
  • I created a custom wizard-like control which shows different forms & control. I'd like to integrate it with Sitefinity by showing forms that were already pre-created in the CMS. I can retrieve the form objevt from the CMS but cannot find a way to render itin my control's view. is there an out of the box  method to do this?
  • Hello Koby,

    You can check the implementation of the current Feather's Forms widget. The source code of the widget could be found here:
    https://github.com/Sitefinity/feather-widgets/tree/master/Telerik.Sitefinity.Frontend.Forms

    I hope this helps.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  • I also need this functionality for pages, but don't see an example for rendering a page in Feather. is there any documentation online for this? 

    I'm looking to achieve something like this:

    <div class="PageContent">

        @HTML.RenderSitefinityPage(Model.pageData)

    </div>

  • Hello Koby,

    For pages you can try to render them in iframe.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  • Can you post an example for rendering a sitefinity page?
  • Hi Koby,

    You can use the Raw helper in the View, for example like:
    @Html.Raw("<iframe  src='http://mysite.com/my-page'></iframe>")

    The result could be found in that screenshot.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items