Copied to clipboard

Flag this post as spam?

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

  • Laureline 20 posts 161 karma points
    May 20, 2016 @ 08:42

    [Umbraco Forms] Custom templates


    I'm a beginner with Umbraco Forms. I have to create different forms with a specific markup for each form. I found how to change the markup for the forms but it seems like I have only one template for all the forms.

    Is it possible to create a template by form ?

    Thanks for your answers.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 20, 2016 @ 18:02
    Dennis Aaen

    Hi Laureline and welcome to our :-)

    If you wish to customize the markup for a specific form and not all your forms that is also possible.

    For a specific form you'll need to create the following folder: ~\Views\Partials\Forms{FormId}\ (FormId needs to be an existing form id, you can view the id of the form in the url

    enter image description here

    As an example if your form id is 0d3e6b2d-db8a-43e5-8f28-36241d712487 then you can overwrite the form view by adding the Form.cshtml file to the directory First copying the default one and then making your changes is the best way to get started .

    I will add this to the documentation page.

    Hope this helps,


  • Christoffer Frede 16 posts 126 karma points
    Oct 12, 2016 @ 10:45
    Christoffer Frede

    ohoy! im currently also in the process of trying to create some umbraco forms with custom markup and i cant seem to figure out how this works. i have found my form id in the url. but where do i use the id ? so far i can see the form.cshtml in partials/forms and i figured i need to create a customForm.cshtml in there. but where do i define which forms should use this template ?

    and lastly has this been added to the documentation page ?

  • John Seto 37 posts 98 karma points
    Oct 12, 2016 @ 15:16
    John Seto

    see my reply below your comment

  • Christoffer Frede 16 posts 126 karma points
    Oct 13, 2016 @ 06:45
    Christoffer Frede

    okay i think i get the idea now. i have created a new Form which is named partials/forms/7dc876b7-0057-4181-8e0d-2bc84d8a80fb/form.cshtml

    then i have copied the code from the partials/forms/form.cshtml view and pasted it in and made a small change, to the code. but i dont see any changes in my form.

    is there anything i need to do when adding the form macro ?

    i have used it like this @Umbraco.RenderMacro("FormsRenderForm", new {FormGuid="7dc876b7-0057-4181-8e0d-2bc84d8a80fb"})

  • Parag Gherwada 7 posts 76 karma points
    Apr 26, 2024 @ 08:10
    Parag Gherwada

    If I make changes to the cshtml file of our.Community.CustomForm package and see those changes reflected at runtime, how can I fix that the updated changes dont lost or replace at runtime?

  • John Seto 37 posts 98 karma points
    Aug 28, 2016 @ 20:40
    John Seto

    Information for others, there's a missing slash in Dennis' filepath for custom forms.

    It should be ~\Views\Partials\Forms{FormId}\ (FormId needs to be an existing form id, you can view the id of the form in the url)

    so for the example above the folder path for custom form should be: ~\Views\Partials\Forms\0d3e6b2d-db8a-43e5-8f28-36241d712487\

  • Damien 36 posts 162 karma points
    Jul 18, 2018 @ 08:38

    Just in case anyone got caught out by this (like me), the location of the form template recently changed:

  • Kunal 19 posts 116 karma points
    Jul 23, 2018 @ 23:05

    And the functionality to automatically select a customized view for a specific form based on Form ID is broken again. My workaround is to hard-code the URL for the Form view.

Please Sign in or register to post replies

Write your reply to: