Solved

How can I use Hubspot forms on my Headless Contentstack site?

  • 29 August 2022
  • 1 reply
  • 325 views

Userlevel 2
Badge

I would like to use the Hubspot forms on my Contentstack site.  I see that I can use their embed form feature to get some JS to use on the frontend to pull in their form.  I was thinking to control this via a Modular Block, so whenever the ‘Hubspot form’ Modular Block is used on the page I will add the HTML snippet to pull in the Hubspot form.  Is this the best way to do it?  

https://knowledge.hubspot.com/forms/how-can-i-share-a-hubspot-form-if-im-using-an-external-site

Thanks!

icon

Best answer by Tyler 2 September 2022, 01:00

View original

1 reply

Userlevel 3
Badge

I would say as far as ease of implementation goes that would be your best bet. I created a Modular block called Hubspot Form, that took a portal ID and a form ID and rendered that in my code. We’re using nextjs so I then wrote a component that rendered that out in React.

I did also go down the route of a full API implementation with Hubspot, but that is much more involved effort wise.

Reply