Copied to clipboard

Flag this post as spam?

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


  • Steve Morgan 1278 posts 4216 karma points c-trib
    Sep 27, 2018 @ 09:30
    Steve Morgan
    0

    Umbraco Forms in Doc Type Grid Editor - scripts not being output when cached?

    Hi,

    The symptoms we're seeing on a website are that the form validation is not working reliably.

    I can see in the source that sometimes the script is generated - other times it's not. When it goes through a period of "not" it stays like that.

    Works in dev so I think it's due to TempData not being set from the cached partial or it being wiped in some kind of race condition?!

    The setup: 1) Doctype Grid Editor with the grid rendering within a cached partial. 2) The scripts are being output as per the Themes - Rendering Script content separately documentation: https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Themes/

    e.g.

    @if (TempData["UmbracoForms"] != null)
    {
        foreach (var form in (List<Guid>)TempData["UmbracoForms"])
        {
            Html.RenderAction("RenderFormScripts", "UmbracoForms", new { formid = form, theme = "yourTheme" });
        }
    }
    

    Has anyone seen this before?

    Umm... ? Suggestions welcome!

    Steve

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies