CMS Development

AM7777
Member

How to associate the form with the existing object records

SOLVE

Hi

 

The issue we are working on is to have the associated objects on a form. Right now we are able to map properties of any objects but they are treated as distinct objects even when we have pre-established association at the object level. This association is not recognized by the forms while saving them. So we were wondering how we might be able to use associated objects on a form. Here is an example to better illustrate.

- Say we have two custom objects, such as program and program participant lifecycle (PPL). The PPL is almost like an opp on a contact with lifecycles and have a program embedded with it. Means the lifecycle is for a contact and a program. Think of a program as a university course and PPL is an application for a program. Now, when we create a form for a contact and program lifecycle, the values get saved for the contact and program participant lifecycle. But the program mapping doesn't carry through while saving. And it ends up creating a duplicate program record with each save. Also, we were wondering if there is a way to populate the dropdown on a form with program values, as these values already exist for which the contact may be applying, creating the program participant lifecycle record.

 

Could you please let me know how we can achieve this.

 

Kindly,

Ayesha

 

 

0 Upvotes
1 Accepted solution
MattPickle
Solution
Participant | Elite Partner
Participant | Elite Partner

How to associate the form with the existing object records

SOLVE

You need to have a unique property on your custom object, meaning that in that property's settings it has the "Require each value for this property to be unique" checkbox selected. This can't be changed after the property is created.


Then you need a field in your form for that unique property so the form will know which record to update. Something like a "Program ID" might make sense for your use case.

 

As far as I know, there is no way to dynamically populate a dropdown in a HubSpot form for them to select an existing program. That would have to be a custom-built html form in a CMS module that pulls the program record data into the form and then submits the data through the HubSpot API.

View solution in original post

3 Replies 3
AM7777
Member

How to associate the form with the existing object records

SOLVE

As far as I know, there is no way to dynamically populate a dropdown in a HubSpot form for them to select an existing program. That would have to be a custom-built html form in a CMS module that pulls the program record data into the form and then submits the data through the HubSpot API.

 

AM: Do we need to use HubSpot CMS as we are using external CMS tool to integrate or is there any other way we can use this in HubSpot Database?

0 Upvotes
MattPickle
Participant | Elite Partner
Participant | Elite Partner

How to associate the form with the existing object records

SOLVE
It doesn't have to be in the HubSpot CMS. You can use the HubSpot API to
get and update records from an external site.
0 Upvotes
MattPickle
Solution
Participant | Elite Partner
Participant | Elite Partner

How to associate the form with the existing object records

SOLVE

You need to have a unique property on your custom object, meaning that in that property's settings it has the "Require each value for this property to be unique" checkbox selected. This can't be changed after the property is created.


Then you need a field in your form for that unique property so the form will know which record to update. Something like a "Program ID" might make sense for your use case.

 

As far as I know, there is no way to dynamically populate a dropdown in a HubSpot form for them to select an existing program. That would have to be a custom-built html form in a CMS module that pulls the program record data into the form and then submits the data through the HubSpot API.