Using the same form on multiple pages

Hello,

I am looking to create a lead gen form and implement on numerous web pages. After submission, I want contacts redirected to specific webpages based on the page they filled out the form. This is so I don’t need to create multiple copies of the same form.

Ideally, i’d also like each contact in HS tagged with the webpage they filled out the form.

Any help on this would be greatly appreciated!

Thanks

Hi @JanakD,

As far as I know, different redirects based on the page the form is embedded on are currently not possible. You would have to create separate forms.

Best regards!

It’s possible to change many things about forms via the embed code. https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options

Have custom “Thank You” redirects per landing page via editing HTML on your form embedd code by altering

redirectUrl

As for tagging the page …

For Hubspot Landing Pages: The Form Submit activity does tag both the form and the page. You can see it on Contact pages, use it in Workflows, etc. (see image)

For External Landing Pages:

You can do this with a Hidden Field and editing custom embed code like above.

  1. Add a hidden field to the form to capture the URL.
  2. Edit your custom embed code. Use Javascript to grab the URL of the page the visitor is on -- I use
window.location.href
  1. Edit the custom embed code to input that URL value into the Hidden Field on your Hubspot form

Thanks for sharing, @DebSchleede!

thank you for sharing this.

Could you please share what would be the required code to add the page URL in the Javascript?
I added a hidden custom property called “from_conversion_url” and am hoping to populate the page URL upon form submission
Thank you!