Copied to clipboard

Flag this post as spam?

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


  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jul 07, 2015 @ 16:29
    Nicholas Westby
    0

    What is RenderMode in Umbraco Forms?

    Was just looking at the code example for Umbraco Forms here: https://our.umbraco.org/Documentation/Products/UmbracoForms/Developer/Custom-Markup/

    I noticed that Model.RenderMode can have values of "full", "form", and "script". I'm pretty sure I know what script is, but I'm unsure of the difference between "full" and "form".

    Is "full" so the entire page will be rendered (e.g., in a postback scenario) and "form" so only the form will be rendered (e.g., in an AJAX scenario)? If so, is there any documentation on how to make use of this capability?

  • Comment author was deleted

    Jul 07, 2015 @ 16:37

    It's been added to allow the scripts to be rendered where you want aka in the bottom of the page instead of inline, docs can be found here https://our.umbraco.org/Documentation/Products/UmbracoForms/Developer/Rendering-Scripts/

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Jul 07, 2015 @ 16:38
    Chriztian Steinmeier
    2

    Hi Nicolas,

    RenderMode lets you decide where to put the JS-dependencies (jQuery et al.)

    • full renders everything, required scripts, form and all.
    • form renders just the form markup
    • script renders the custom script for the validations

    I've added an issue to the tracker suggesting a fourth dependencies mode/partial to complete the tool-set :-)

    Hope that helps,

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft