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 2005 posts 6843 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?

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jul 07, 2015 @ 16:37
    Tim Geyssens
    100

    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 2726 posts 8320 karma points MVP 4x 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

  • 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