Copied to clipboard

Flag this post as spam?

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


  • Tobias 14 posts 86 karma points
    Jun 22, 2022 @ 13:12
    Tobias
    1

    Umbraco Forms 10 Installing a macro?

    When installing a clean Umbraco 10 installation together with Umbraco Forms 10, I noticed that this Macro is being installed: enter image description here

    However, no file named InsertUmbracoFormWithTheme.cshtml is actually added to ~/Views/MacroPartials/. And despite the folder being empty, I can still run this piece of code to render my form:

    @await Umbraco.RenderMacroAsync("renderUmbracoForm", new { FormGuid = Model.Form })
    

    Why is that? What is actually running here and why can't I see it?

    Here's a screenshot of the database as well: enter image description here

  • Damian Clarke 2 posts 71 karma points
    Sep 10, 2022 @ 11:54
    Damian Clarke
    0

    Hi Tobias, I am new to forms on v10 but I did read that the macro file is embedded as a static resource embedded in the forms dll. It does not exist as a file you can edit.

  • Matthew Wise 271 posts 1373 karma points MVP 5x c-trib
    Sep 13, 2022 @ 12:33
    Matthew Wise
    100

    Hi,

    Building on Damian's, answer its embedding these resources using a Razor Class library.

    You can override the file by adding a physical at the same path if you needed to.

    Kevin Jump has a great blog post on RCLs and Umbraco packages here

    Matt

  • 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