APIs & Integrations

ballonura
Participant

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

There is anyway to do programmatically redirect the same form across multiple pages without require jQuery lib?

 

Like this solution just without jQuery:

https://community.hubspot.com/t5/Content-Strategy-SEO/Creating-a-download-or-e-book-download/td-p/35...

0 Upvotes
1 Accepted solution
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

Hey @ballonura ,

 

If you're using a non-HubSpot hosted pages, your team would have to use either the How to customize the form embed code or Using Global Form Events to set up the redirect. 

View solution in original post

0 Upvotes
6 Replies 6
WendyGoh
HubSpot Employee
HubSpot Employee

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

Hey @ballonura,

 

Do you mean that after the visitor submits the form, you'd like to redirect it to another page?

 

If so, you can set it under the options form settings:

 

redirect.png

0 Upvotes
ballonura
Participant

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

I want use the same form accross multiple pages, but on each page, after submit redirect to different place.

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

Hey @ballonura,

 

Can I check if these pages are HubSpot hosted pages? If yes, you can set different redirect page on the same page for different pages by setting it on the form module: Redirect a form submission on an offer page to gated content or a thank you page.

 

If you're using non-HubSpot form, the only way to set different redirect on different pages for the same page, is to use the How to customize the form embed code

0 Upvotes
ballonura
Participant

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

Hey @WendyGoh,

They non-Hubspot hosted pages, only HubSpot forms that embedded on my site.

0 Upvotes
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

Hey @ballonura ,

 

If you're using a non-HubSpot hosted pages, your team would have to use either the How to customize the form embed code or Using Global Form Events to set up the redirect. 

0 Upvotes
ballonura
Participant

Programmatically form redirect without jQuery (onFormSubmit)

SOLVE

The @WendyGoh. For everyone interest, here is the non-jQuery solution:

https://legacydocs.hubspot.com/global-form-events

Good day. :manhappy:

0 Upvotes