Copied to clipboard

Flag this post as spam?

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


  • Sören Deger 733 posts 2844 karma points c-trib
    Mar 05, 2015 @ 13:35
    Sören Deger
    0

    External url for Forms submit

    Hello,

    in Forms I can only set a text for the submit page or I can choose a content node via contentpicker. Is it possible to set an external url as "thank you" page after submit?

    Best,

    Sören

  • Sören Deger 733 posts 2844 karma points c-trib
    Mar 26, 2015 @ 15:01
    Sören Deger
    0

    Hi all,

    have everyone a solution for this or an idea to solve this? Any support is helpful. Thanks in advance.

     

    Sören

  • Frederik Raabye 72 posts 276 karma points MVP 2x c-trib
    Mar 26, 2015 @ 15:43
    Frederik Raabye
    100

    Not an ideal solution, but as a work around you could create a redirect template for a content node. Either serverside or client side redirect from there. /Frederik

  • Sören Deger 733 posts 2844 karma points c-trib
    Mar 26, 2015 @ 15:48
    Sören Deger
    0

    Hi Frederik,

    thank you! You're right, it's not an ideal solution. But this will work and now I have another idea: it might even work with a custom workflow. Will try both versions in the next days :)

     

    Best,

    Sören

  • Nathan Skidmore 63 posts 251 karma points c-trib
    Oct 07, 2015 @ 16:42
    Nathan Skidmore
    0

    I need to do something similar to this. Did you get it working in the end?

    What I actually want to do is pass a querystring parameter to the on submit page. For example, if a user submits a form, they go to a new page with a message, thank you "persons name". I could use TempData for this, but the form value doesn't exist on load, so it would have to be stored via an on change javascript event.

    Is there an obvious way to do this that I'm overlooking?

    Thanks in advance.

  • Nathan Skidmore 63 posts 251 karma points c-trib
    Oct 08, 2015 @ 15:07
    Nathan Skidmore
    0

    FYI if anyone else is looking to pass completed form data to the On Submit Page, I have managed to achieve this by overriding the OnFormHandled method and storing the form data I need in TempData. In the example I have used an alias emailAddress as the data I want to pass through.

    E.g.

    public class FormsSurfaceController : UmbracoFormsController
    {
        protected override void OnFormHandled(Form form, FormViewModel model)
        {
            foreach (Field field in form.AllFields.Where(x => x.Alias == "emailAddress"))
            {
                if (model.FormState != null && model.FormState.ContainsKey(field.Id.ToString()))
                {
                    TempData["emailAddress"] = model.FormState[field.Id.ToString()].GetValue(0).ToString();
                }
            }
        }
    }
    

    Then on the destination page you just need to check TempData for the value you stored.

    var emailAddress = TempData["emailAddress"] as string;
    

    Umbraco Forms doesn't seem to be very well documented so I hope someone else finds use of this.

  • Brian Lacy 28 posts 101 karma points
    Jan 17, 2017 @ 23:54
    Brian Lacy
    0

    How can I change ModelState and redirect the user back to the form?

Please Sign in or register to post replies

Write your reply to:

Draft