a have displayed HubSpot form in the post like http://localhost/wordpress/resource/11-recruiting-best-practices-during-covid-19/.
After the form is submitted, redirected to the thank you page. http://localhost/wordpress/thank-you/, I want to append previous post slug or URL in thank you page http://localhost/wordpress/thank-you/11-recruiting-best-practices-during-covid-19/
Hey @ashu0811
Thank you for sharing this. I’ll tag a few experts that can share their expertise.
Hey @stefen @John @Stephanie-OG any tips you can share with @ashu0811?
Thank you ![]()
Sharon
Thanks @sharonlicari ![]()
@ashu0811 I wrote a post about adding parameter to a form redirect URL at one point which is a fairly similar use case.
On the page itself, you can update the redirect URL (at least at the time, I found it didn’t work if you updated it for the form on the forms tool), and can add in parameters there. To do so, click into the form module on the page, go to Thank You and on the redirect link click on “+ Add external link”, it should show this pop-up (more on the Help Center here ![]()
HubSpot form thank you redirect - add an external link
To get the page slug, you can use the HubL token
{{ content.slug }}
(more on the developer documentation here ), so the redirect URL would be:
http://localhost/wordpress/thank-you/{{ content.slug }}
I just tested it on my site and it seems to work!
EDIT: It just occurred to me that you might be on Wordpress. Depending on how you’re using it you should still be able to update the thank you page redirect URL, but the HubL
{{ content.slug }}
won’t work. Perhaps there’s a similar way to get that in PHP? Again, you would probably need to update the redirect URL locally in the embed code or plugin (if possible) and not in the HubSpot Forms tool.
Stephanie O’Gay Garcia
Yes. I am using wordpress. And I want to dynamically add post slug to thank you page URL. So that i will get post details in thank you page.
