Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Jan 15, 2018 @ 11:52
    Gordon Saxby
    0

    DatePicker scripts appearing in source twice

    Umbraco 7.5.11 and Forms 4.4.3

    I have a simple form using a single DatePicker field. I have all of the JS files at the bottom of the page, so have made the alteration to InsertUmbracoForm.cshtml as detailed here https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Rendering-Scripts/

    I have put @Umbraco.RenderMacro("FormsRenderScripts") at the very bottom, just before the tag.

    When the page containing the form loads I get the following error:

    Uncaught ReferenceError: $ is not defined
    

    The problem is that the JS script from the DatePicker.cshtml file is added to the page where the form is positioned, but jQuery has not been loaded yet (all includes are at the bottom of the page).

    Is there a way to fix this, other than putting my JS includes at the top of the page and removing the alteration to InsertUmbracoForm.cshtml?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jan 15, 2018 @ 15:59
    Dennis Aaen
    0

    Hi Gorden,

    Could you please try to upgrade to the latest version of Umbraco Forms 4 which is 4.4.6 and see if its still an issue.

    If it is, then please create a issue on the tracker so we have it and it can be fixed. http://issues.umbraco.org/issues/CON

    /Dennis

  • Gordon Saxby 1461 posts 1883 karma points
    Jan 16, 2018 @ 09:06
    Gordon Saxby
    0

    I have updated this morning and the same problem still exists.

    I have created an issue for it - http://issues.umbraco.org/issue/CON-1481.

Please Sign in or register to post replies

Write your reply to:

Draft