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?
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
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 :)
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?
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.
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
Hi all,
have everyone a solution for this or an idea to solve this? Any support is helpful. Thanks in advance.
Sören
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
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
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.
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.
Then on the destination page you just need to check TempData for the value you stored.
Umbraco Forms doesn't seem to be very well documented so I hope someone else finds use of this.
How can I change ModelState and redirect the user back to the form?
is working on a reply...