Redirect to referring page after form submission

by Paul H   Last Updated October 09, 2019 20:07 PM

Trying to figure out how to redirect a user back to referring page after they have completed our feedback form. So a scenario would be if im on page foo/bar and I click on feedback webform link on that page. I then proceed to fill out the webform and then hit submit I will then be directed back to foo/bar page with confirmation message displayed at top of page. Webform module does give me an option to add in a custom confirmation URL and also the ability to add in tokens. However I have had no success with current tokens as none of them redirect me back to referring page.

enter image description here

Would creating a custom token maybe help with resolving this issue or hook_form_alter? Kind of stuck on how best to approach this.

Tags : 8 webforms

Related Questions

Post/redirect form to url of node selected

Updated January 05, 2019 15:07 PM

Drupal 8: Prevent webform from saving IP

Updated May 08, 2018 09:07 AM