Is it possible in UmbracoForms to send a query parameter to the thank you page? For instance, I want a hidden field to be sent to the thank you page (/form/thankyou?field=xxx) so that I can track it with Google Analytics. Does anybody know if this is possible?
Workflow for example - redirect to first child node under form page
public class ChildThankYouPage : WorkflowType
{
public ChildThankYouPage()
{
Name = "Child Thank You Page";
Id = new Guid("4DE6729C-9808-4FFE-A668-8C67A0D98C6C");
Description = "Redirect to child page with thank you message";
}
public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
{
try
{
var helper = new UmbracoHelper(UmbracoContext.Current);
var page = helper.TypedContent(UmbracoContext.Current.PageId);
var thankYouChild = page?.Children.FirstOrDefault();
if (thankYouChild != null)
{
HttpContext.Current.Response.Redirect(thankYouChild.Url);
}
}
catch (Exception ex)
{
LogHelper.Error<ChildThankYouPage>($"Workflow Error:", ex);
return WorkflowExecutionStatus.Failed;
}
return WorkflowExecutionStatus.Completed;
}
public override List<Exception> ValidateSettings()
{
var exceptions = new List<Exception>();
return exceptions;
}
}
Send queryparameter to thank you page
Is it possible in UmbracoForms to send a query parameter to the thank you page? For instance, I want a hidden field to be sent to the thank you page (/form/thankyou?field=xxx) so that I can track it with Google Analytics. Does anybody know if this is possible?
Thanks in advance!
You can create a custom workflow and control your redirection parameters
Thanks! Did not know this, going to look into it.
Workflow for example - redirect to first child node under form page
is working on a reply...