CMS Development

Jsum
Key Advisor

Hubspot Form Dynamic Multi-Select Field based on Multi-Select HubDB Column

SOLVE

Hi all,

 

I am looking for some creative ideas on customizing a Hubspot form based on a HubDB column.

 

I am using dynamic pages with HubDB. There is a listing page of suppliers, each providing various product types. The types are assigned to the supplier by a multi-select foreign key column.

 

I have a form on the individual item pages. I would like to allow the user to select which product types they are interested in, but I only want to display the product types available from the row's product type column. So if a supplier has 'product 1', 'product 3', and 'product 4' available, those are the options available in the form.

 

The one thing I can think of is to create a multi-select form field containing all of the product tags, and then use javascript to only show checkboxes whose values correspond to tags in the HubDB column. That's a little hacky though, so I thought I'd check and see if anyone has a better idea.

** Resources:
https://community.hubspot.com/t5/APIs-Integrations/Ajax-Form-Submission/td-p/291941

1 Accepted solution
zwolfson
Solution
HubSpot Employee
HubSpot Employee

Hubspot Form Dynamic Multi-Select Field based on Multi-Select HubDB Column

SOLVE

Hi @Jsum ,

 

I think the best way to accomplish this would be to use the Forms API. Because this supports cross origin requets you can simply handle the form submission in the JS portion of your module. This way your form can do whatever you need to do and simply tell HubSpot about the submission later. 

View solution in original post

2 Replies 2
zwolfson
Solution
HubSpot Employee
HubSpot Employee

Hubspot Form Dynamic Multi-Select Field based on Multi-Select HubDB Column

SOLVE

Hi @Jsum ,

 

I think the best way to accomplish this would be to use the Forms API. Because this supports cross origin requets you can simply handle the form submission in the JS portion of your module. This way your form can do whatever you need to do and simply tell HubSpot about the submission later. 

Jsum
Key Advisor

Hubspot Form Dynamic Multi-Select Field based on Multi-Select HubDB Column

SOLVE

This is really cool. I'm going to build a comma-separated list from the checkboxes my tags generate and submit to a text field in the Hubspot form I create.