Syncing forms between website & HubSpot


#1

Hi,

My client’s admin users need to be able to create HubSpot forms (through HubSpot’s UI), which then appear on their website automatically. I definitely would like to use the API for this as I would like to retain full control of the HTML, CSS and server-side management of the forms.

I believe I can do this by using https://developers.hubspot.com/docs/methods/forms/v2/get_form – however I do not wish to make a call every time a user hits the page, rather only ‘sync’ the forms when the forms are updated.

Does HubSpot offer a HTTP Push option to notify an endpoint that I specify, whenever a form’s schema is updated through the HubSpot UI, or another viable option?

Thanks,
Andy


#2

@fitchy7 You essentially have two options.

  1. You can use the Forms UI to create the form and can embed the code into the website so it will always be up to date and you would never need to push anything from HubSpot. You would lose control of the client-side code for the form and there would be nothing server-side in this set up.

  2. You can create a custom form yourself where you can design all of the HTML/CSS/JS and have full control as that. You can use the Forms API to sync the form submissions back over to HubSpot in which you would control the server-side code for this POST call as well. They wouldn’t be able to create forms through the UI with this set up however.


#3

Hi pmanca,

Thank you for the prompt response and for clearing that up for me.

The client is keen to be able to manage all their forms within the Forms UI, but also wants a very adaptable solution where they can just drop a form ID into our CMS in different contexts on a page and have it show the respective form in the style suiting that page, sat on top of the nice client & server side validation setup I’ve already built.

It’s a shame as some kind of pseudo-live syncing would have been ideal for this.

Cheers,
Andy


#4

@fitchy7 It sounds like the first option would work for you then. You can just drop off the embed code on the site and it would always stay up to date. Why do you need to control that specific part of the code?