Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonathan Cammisuli 3 posts 33 karma points
    Dec 16, 2014 @ 18:06
    Jonathan Cammisuli
    0

    Render Umbraco Form on template

    Hey guys,

    I'm trying out the new Umbraco Forms that came with Umbraco 7.2, and I'm wondering how to actually render the form on the template.

    I added a form picker property to my document type, and successfully selected a form. But when I try to render that, it just shows a guid.

    What's the best way to actually show the form? We're using the WebForm rendering engine, but having a solution to both webforms and mvc would be helpful.

    Thanks!

  • Amir Khan 1287 posts 2744 karma points
    Dec 16, 2014 @ 19:45
    Amir Khan
    0

    Hey Jonathan,

    In webforms for Contour it was like this: <umbraco:Macro FormGuid="RenderPropertyContainingGUIDHere" Alias="umbracoContour.RazorRenderForm" runat="server"></umbraco:Macro>

    And MVC: @Umbraco.RenderMacro("umbracoContour.RazorRenderForm", new {FormGuid="RenderPropertyContainingGUIDHere" })

    Not sure if these have changed, but hopefully this will help!

    -Amir

  • Amir Khan 1287 posts 2744 karma points
    Dec 16, 2014 @ 20:36
    Amir Khan
    101

    Looks like it is basically the same for Umbraco Forms in MVC:     
    @Umbraco.RenderMacro("umbracoforms.RenderForm", new {[email protected]})

    -Amir

     

     

  • Comment author was deleted

    Dec 17, 2014 @ 09:57

    Yup stil, the same you'll need to add the insert form macro and pass that a valid form id 

Please Sign in or register to post replies

Write your reply to:

Draft