Copied to clipboard

Flag this post as spam?

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


  • Laith 6 posts 46 karma points
    Feb 02, 2016 @ 17:50
    Laith
    0

    Generate razor for contour form

    I've created a contour form and inserted into a template using: @Umbraco.RenderMacro("umbracoContourRazorRenderForm", new {FormGuid="..."})

    This generates a macroscript although it doesn't contain any meaningful razor code which I can add classes etc It just contains an Html.RenderMvcAction passing in action, controller, formGuid, formtoken etc

    When I inserted my contour form into the template I selected "Insert from Umbraco contour".

    In this video: http://umbraco.com/follow-us/blog-archive/2012/11/8/contour-30-features-full-control-over-form-markup/

    After watching the following video I noticed there is also a "razor contour form" option @1.42 although I don't have this option. Later @ 2.02 he shows the razor code.

    How do I generate the razor code?

    I'm using Umbraco version 7.3.5 and Umbraco Contour version 3.0.28

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 02, 2016 @ 20:42
    Jan Skovgaard
    0

    Hi Laith

    If I remember correctly you should be able to find the partials for Umbraco Contour in the /Views/Partials/Forms folder where you can see the view for the form itself and the different input types that a form can consist of.

    Is this what you're looking for?

    /Jan

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Feb 02, 2016 @ 21:44
    Dennis Aaen
    100

    Hi Laith,

    Since you are using Contour you should have a look at this documentation https://our.umbraco.org/projects/umbraco-pro/contour/documentation/Developer/Custom-Markup/

    The views can be found in the ~\Umbraco\plugins\umbracoContour\Views directory

    And you also have the option to create custom markup for a specific form, so your all forms donĀ“t need to contain the same markup.

    Hope this helps,

    /Dennis

  • Laith 6 posts 46 karma points
    Feb 10, 2016 @ 10:04
    Laith
    0

    Thanks Dennis, the section "Customizing for a specific form" is exactly what I was after!

Please Sign in or register to post replies

Write your reply to:

Draft