Copied to clipboard

Flag this post as spam?

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


  • Jamaal 6 posts 116 karma points
    Feb 01, 2024 @ 10:23
    Jamaal
    0

    Hello, I'm new to umbraco. I have installed umbraco v8.18.5 and umbraco form 8.13.11.

    Im trying to render the form on front by using this code:

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.ReservationInquiry>
    @using ContentModels = Umbraco.Web.PublishedModels;
    
    @{
        Layout = "master.cshtml";
    }    
    @Html.RenderUmbracoForm("79720b8d-bfd5-41e3-960c-c430750fa51a")
    

    The error message im getting :

    CS1061: 'HtmlHelper<ReservationInquiry>' does not contain a definition for 'RenderUmbracoForm' and no accessible extension method
    

    'RenderUmbracoForm' accepting a first argument of type 'HtmlHelper

    I don't know if im doing it the correct way :(, please advise? Thanks

  • Lili 5 posts 96 karma points c-trib
    Feb 01, 2024 @ 15:33
    Lili
    0

    Try using this instead:

    @Umbraco.RenderMacro("renderUmbracoForm", new {FormGuid="79720b8d-bfd5-41e3-960c-c430750fa51a", FormTheme="yourTheme", ExcludeScripts="0"})
    

    Snipped taken from the Umbraco V8 documentation here: https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/

  • Jamaal 6 posts 116 karma points
    Feb 19, 2024 @ 05:14
    Jamaal
    100

    The solution provided is not working. My approach are :

    1. creating a macro with parameters enter image description here

    2. Adding this code below in my template :

      @Umbraco.RenderMacro("contactForm", new {formName="d5056b9d-70d3-4a6b-8d75-c5e81ed86452", formTheme="bootstrap3-horizontal"})

    Still no luck. I don't know what i'm doing wrong. Any idea please? Thanks

  • Lili 5 posts 96 karma points c-trib
    Feb 19, 2024 @ 10:14
    Lili
    100

    Try replacing formName with FormGuid and formTheme with FormTheme

Please Sign in or register to post replies

Write your reply to:

Draft