Copied to clipboard

Flag this post as spam?

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


  • Dennis 5 posts 95 karma points
    Dec 10, 2015 @ 10:29
    Dennis
    0

    Umbraco Forms: Customize Submit Message

    hello, my name is dennis, i´m new here and my english is not the best :D

    but i have one question about the message on submit in the forms.

    @if (Model.SubmitHandled)
    {
        if (Model.RenderMode == "full" || Model.RenderMode == "form")
        {
        <p class="contourMessageOnSubmit">@Html.Raw(Model.MessageOnSubmit)</p>
        }
    }
    

    so my question: could i insert instead of

    @Html.Raw(Model.MessageOnSubmit)
    

    some diffrent code, that i can insert a field from the current page where the form is rendered? for example a textfield called "confirmText"?


    Thanks in advance!

    Dennis

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 10, 2015 @ 10:43
    Dennis Aaen
    0

    Hi Dennis,

    You can customize text on the submit button, and also the message that you get after the page has been submitted.

    Try to see this documentation https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Editor/Creating-a-form/Form-Settings/

    Hope this helps,

    /Dennis

  • Dennis 5 posts 95 karma points
    Dec 10, 2015 @ 10:54
    Dennis
    0

    hi Dennis ^^,

    thanks for the fast answer!

    but my problem is that i want to use one form for many pages, and with every page i want to have a diffrent submit message.

    hope you understand my problem :/

    /Dennis

  • Dennis 5 posts 95 karma points
    Dec 15, 2015 @ 14:12
    Dennis
    0

    so, found a solution :D

    maybe it could help someone else!

    @if (Model.SubmitHandled)
    {
        if (Model.RenderMode == "full" || Model.RenderMode == "form")
        {
            var cpage = umbraco.NodeFactory.Node.GetCurrent().GetChildNodes().First().Id;
    
            HttpContext.Current.Response.Redirect(string.Format("{0}", umbraco.library.NiceUrl(cpage)));
    
        }
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft