Copied to clipboard

Flag this post as spam?

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


  • Jeff Lewis 14 posts 84 karma points
    Jun 13, 2017 @ 17:37
    Jeff Lewis
    0

    Cannot Insert Forms

    Greetings,

    We are having an issue where the Insert Form macro will not allow us to select a form. Included are screenshots. When I click the 'Add' button, nothing happens, although I was under the impression that the forms we have created should show up as a list instead of the 'Add' button.

    I have checked folder permissions, and they are correct. I have also ensured that the UmbracoForms files are in the App_Plugins folder.

    Any suggestions would be much appreciated.

    Thanks!

    Our Forms

    The insert form macro on a content page

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jun 13, 2017 @ 17:53
    Dennis Aaen
    0

    Hi Jeff and welcome to our.

    I can see that you have upgraded to Umbraco 7.6.x and when you do this you also need to use Umbraco 6.0.x so there for you will need to upgrade your forms to 6.0.1

    Try to see how you can do it here https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Installation/Version-Specific

    Before you do the upgrade I highly recommend you to take a backup so you can rollback in case that the upgrade did not goes as planed.

    Hope this helps,

    /Dennis

  • Jeff Lewis 14 posts 84 karma points
    Jun 13, 2017 @ 17:58
    Jeff Lewis
    0

    Hey Dennis,

    Thanks for the quick reply.

    It's very strange that it says version 4.4.2 in forms, because I have the latest version installed via NuGet. Actually, I didn't install it in the project until after the upgrade because we've only very recently started using forms.

    enter image description here

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jun 13, 2017 @ 18:00
    Dennis Aaen
    0

    Hi Jeff,

    Could you please check what the dll of Umbraco Forms says in the bin folder?

    /Dennis

  • Jeff Lewis 14 posts 84 karma points
    Jun 13, 2017 @ 18:09
    Jeff Lewis
    0

    It is 6.0.1.

    Forms DLL version

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jun 13, 2017 @ 18:20
    Dennis Aaen
    0

    Hi Jeff,

    Okay could you please check the version file in the /App_Plugins/UmbracoForms

    After this please make sure that you have this macro in your installation

    enter image description here

    And the content of the file should be located in ~/Views/MacroPartials/InsertUmbracoFormWithTheme.cshtml

    The name of the site should be InsertUmbracoFormWithTheme and contains this content

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    
    @if (Model.MacroParameters["FormGuid"] != null)
    {
        var s = Model.MacroParameters["FormGuid"].ToString();
        var theme = "";
        var includeScripts = true;
    
        @*
            If a theme is provided as a macro parameter, forms will attempt to use custom theme files
            ex: given the value "test", forms will look up views for the form and fields in a custom directory:
    
            Form will be rendered with
                /Views/Partials/Forms/Themes/test/form.cshml
    
            Fields will be rendered with
                /Views/Partials/Forms/Themes/test/FieldType/[fieldtypename].cshtml
    
            If a file is not available in the custom directory, forms will fallback to the default files in
                /Views/Partials/Forms/Themes/default/
        *@
    
        if(Model.MacroParameters.ContainsKey("FormTheme"))
        {
            theme = Model.MacroParameters["FormTheme"].ToString();
        }
    
        if (Model.MacroParameters.ContainsKey("ExcludeScripts"))
        {
    
            @*
                Inverse the boolean - RenderAction Parameter expects it to be false for exclusion
                But with default value for Macro Paramater boolean/checkbox being false 
                We want to ensure by default we include the scripts next to the form
            *@
            includeScripts = Model.MacroParameters["ExcludeScripts"].ToString() == "0";
        }
    
        var form = new Guid(s);
        var recordGuid = Guid.Empty;
    
        if (string.IsNullOrEmpty(Request.QueryString["recordId"]) == false)
        {
            Guid.TryParse(Request.QueryString["recordId"], out recordGuid);
        }
    
        Html.RenderAction("RenderForm", "UmbracoForms", new {formId = form, recordId = recordGuid, theme = theme, includeScripts = includeScripts });
    }
    

    You should also have a partial view macro file called. RenderUmbracoFormScripts.cshtml

    This should contain the following code.

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @using Umbraco.Forms.Web.Controllers
    
    @if (TempData["UmbracoForms"] != null)
    {
        foreach (var form in (List<Guid>)TempData["UmbracoForms"])
        {
            Html.RenderAction("Render", "UmbracoForms", new { formId = form, mode = "script"});
        }
    }
    

    Hope this helps,

    /Dennis

  • Jeff Lewis 14 posts 84 karma points
    Jun 13, 2017 @ 18:34
    Jeff Lewis
    0

    I uninstalled forms, deleted the folder in App_Plugins, and then re-installed it. Now the version is 6.0.1 and looks as it should for the new version, but it still is not working properly (not showing my forms to select from), and I'm getting a javascript error on the content page while trying to insert a form.

    enter image description here

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jun 14, 2017 @ 08:39
    Dennis Aaen
    0

    Hi Jeff.

    Could you please try to install it as a local package using this https://umbraconightlies.blob.core.windows.net/umbraco-forms-release/UmbracoForms.Package.6.0.1.zip

    So first uninstall the Umbraco Forms package, and install it with the link above.

    /Dennis

  • Jeff Lewis 14 posts 84 karma points
    Jun 19, 2017 @ 16:13
    Jeff Lewis
    0

    Hey Dennis,

    Thanks again for the responses. I'm not sure exactly what happened, but it started working after I deleted the UmbracoForms files in the App_Plugins folder, the uninstalled and re-installed the package via NuGet.

    It didn't initially work, but then [insert magic here] happened and it started working. The manual method of installing with the zip was not necessary.

    Thanks for your help, much appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft