Copied to clipboard

Flag this post as spam?

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


  • Steve Fabian 21 posts 102 karma points
    Aug 15, 2016 @ 17:53
    Steve Fabian
    0

    Problem adding a from

    I am trying to add a form by enabling macros in a rich text editor. When I choose the form get the error message in the screenshot below. I'm relatively new to Umbraco. Any help is greatly appreciated!

    enter image description here

  • Cimplex 113 posts 576 karma points
    Aug 15, 2016 @ 18:16
    Cimplex
    0

    Hi Steve, Can you please provide us with the code in your partialview?

    // Herman

  • Steve Fabian 21 posts 102 karma points
    Aug 15, 2016 @ 18:24
    Steve Fabian
    0

    Herman, Thanks for the reply. Here is the code...

    @inherits Umbraco.Web.Macros.PartialViewMacroPage

    @if (Model.MacroParameters["FormGuid"] != null) { var s = Model.MacroParameters["FormGuid"].ToString(); var g = new Guid(s);

    var recordGuid = Guid.Empty;
    
    if (string.IsNullOrEmpty(Request.QueryString["recordId"]) == false)
    {
        Guid.TryParse(Request.QueryString["recordId"], out recordGuid);
    }
    
    Html.RenderAction("Render", "UmbracoForms", new {formId = g, recordId = recordGuid mode = "form" });
    

    }

  • Cimplex 113 posts 576 karma points
    Aug 15, 2016 @ 18:29
    Cimplex
    0

    I noticed that there is a comma missing:

    Html.RenderAction("Render", "UmbracoForms", new {formId = g, recordId = recordGuid ---Here-- mode = "form" });
    

    Does that help?

    // Herman

  • Steve Fabian 21 posts 102 karma points
    Aug 15, 2016 @ 18:39
    Steve Fabian
    1

    Duhhhh. Thanks! I missed that. It's working now.

Please Sign in or register to post replies

Write your reply to:

Draft