Form usage question - is this possible?

forms

#1

Hi,
I’m trying to figure out if it’s possible to integrate HubSpot Forms in the following way:

  1. Build and configure the form in Hubspot
  2. Through some API, get json that represents the form setup (fields, selects with options, checkboxes etc) to the server side of my website.
  3. Construct a form based on the response json that the API returned together with some other options that lives in my application.

The thing is here, that i need to fill a copuple of “selects” in the form with options that are fetched from a database in my application - i dont’t want to manage those possible options in two places (my application and HubSpot)

I know i can build a custom form in my app and just post the form to hubspot, but the customer wants to be able to build the form in Hubspot portal.

Hope i made may case clear, thanks!


#2

Patrik,

This should be possible using the Forms API:

Get form:
https://developers.hubspot.com/docs/methods/forms/v2/get_form

Post data to form
https://developers.hubspot.com/docs/methods/forms/submit_form

You could also in theory dynamically update the form in question to use values for the select element that you define in your application and use the actual HubSpot embeddable form instead of having to custom build a proxy form to submit the data to the form submit endpoint.

Hope that helps.


#3

Thank you Derek, this definitely pointed me in the right direction!