If you're using Contour (not Forms) then you can enter the thank you page as an XPATH. This allows you to find the redirect based on the form's location (currentPage). Next to the "send to page" field, click on "Or enter Xpath".
I'm not 100% sure of the syntax, and I'm assuming that you have a specific doctype for your thank you page, I think you want to use something like this…
Thank you @René for your fast answer but i've chosen an other path.
My solution: (the language is the first parameter of my routing)
I've created 2 document types
1- "ContactFormResult"
Goal: display a result message when a contact form is filled with the correct language.
It contains one rich text field to fill the message to display
2- "ContactFormRouter"
Goal: redirect to a specific page based on the previous URL.
It contains one field that i've called "default" with basic url to redirect.
In the template i concatenate "Request.UrlReferrer" with the name of my desired page, if "Request.UrlReferrer" is null or empty i use the default field and do a "Response.Redirect".
Then i've change the target page in the workflow form to the "ContactFormRouter"
Redirecting form to thank you page for the respective Language
Hi,
I have added a Contour form to a page, now on submit i want to redirect the users to the thank you page.
I am using the same form for different languages and the redirect should happen to the thank you page of the same language. How can I achieve this.
user submitting form /en/contact should go to /en/contact/thank-you and user submitting form /ar/contact should go to /ar/contact/thank-you
Thanks Pankaj
Hi Pankaj
Did you find a solution for this.
I have the exact same setup.
René
Hi René,
If you're using Contour (not Forms) then you can enter the thank you page as an XPATH. This allows you to find the redirect based on the form's location (currentPage). Next to the "send to page" field, click on "Or enter Xpath".
I'm not 100% sure of the syntax, and I'm assuming that you have a specific doctype for your thank you page, I think you want to use something like this…
$currentPage//node [@nodeTypeAlias = 'AliasOfYourThankYouPage']"
More info on XPATH here and here. I hope this helps, or at least points you in the right direction.
David.
Hi
It is form i use.
I found a solution, changing the guid where i put the form macro, then it works.
René
Hello @René
Could you describe how you manage to update the guid please ?
Ali
Hi
This is a long time since i did this one :-)
In contour i create a form for each language. Then with a formpicker i choose witch form to use in the page / language.
The formpicker only gets the guid, so it is possible just to make a textfield to add the guid.
Then i have the fredom to redirect to a different page, for each language.
Hope this will clarify, and give a direction to the solution.
René
Thank you @René for your fast answer but i've chosen an other path.
My solution: (the language is the first parameter of my routing)
I've created 2 document types
1- "ContactFormResult"
Goal: display a result message when a contact form is filled with the correct language. It contains one rich text field to fill the message to display
2- "ContactFormRouter"
Goal: redirect to a specific page based on the previous URL. It contains one field that i've called "default" with basic url to redirect. In the template i concatenate "Request.UrlReferrer" with the name of my desired page, if "Request.UrlReferrer" is null or empty i use the default field and do a "Response.Redirect".
Then i've change the target page in the workflow form to the "ContactFormRouter"
It works really well.
Thank you anyway !
is working on a reply...