Tips, Tricks & Best Practices

ecaww
Participant | Diamond Partner
Participant | Diamond Partner

Adding a Group Field to a Form

SOLVE

Hello all! I'm trying to create a dynamic set of field entries in a form. For example, I need to have: 

First Name, Last Name, Email, Job Title
And have it so that the user (when filling out the form) can "Add More". 
I've heard that you can use a Group Field to bundle them up for that, but I can't find where that is. Any help is much appreciated. Thank you!

0 Upvotes
1 Accepted solution
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Adding a Group Field to a Form

SOLVE

Hey @ecaww there's no feature in HubSpot forms called a "group field". The panel which shows properties/fields to use pulls in "groups" from your HubSpot properties, but this is just for organising properties and can't be used in the actual forms. 

With HubSpot forms, the "dynamic" elements are either progressive fields or depenedent fields

Progressive fields works by hiding a field if the value is already known for that contact and displaying a new field, so you might say something like "If company name is known, display company location". This is useful if you're expecting returning visitors to a form as it pulls the browser cookie to identify them. 

Dependent fields work as an "if/then" branch, you can say "If a customer chooses American in the country field then display the state field". This is a way to add additional fields based on a users specific answers. 

There's no feature to just have a user "add more" fields, however we could use dependent fields and a custom checkbox property to get around this. 
We could create a custom property for "add additional fields" which lists all the additional fields available, we can then set dependent fields to display if any of these values are selected. 

For example we could say "add more in the field placeholder" when I click it I'm shown a list of checkboxes, let's say they are "Address, Company size, Job Title, Home Phone". We can then set a dependent field to say "When Address is checked show the address field" "When company size is checked show the company size field" and so on. Meaning when someone checks any or all of these checkboxes the form will show new fields on the form based on the ones they've checked. 

It is a bit a workaround and may get messy if you have a lot of fields you want to add but it would be the only way to achieve this without custom code! 
It would look something like this in the editor: 

TomM2_0-1683369168384.png




Hope this helps! 


Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


View solution in original post

1 Reply 1
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Adding a Group Field to a Form

SOLVE

Hey @ecaww there's no feature in HubSpot forms called a "group field". The panel which shows properties/fields to use pulls in "groups" from your HubSpot properties, but this is just for organising properties and can't be used in the actual forms. 

With HubSpot forms, the "dynamic" elements are either progressive fields or depenedent fields

Progressive fields works by hiding a field if the value is already known for that contact and displaying a new field, so you might say something like "If company name is known, display company location". This is useful if you're expecting returning visitors to a form as it pulls the browser cookie to identify them. 

Dependent fields work as an "if/then" branch, you can say "If a customer chooses American in the country field then display the state field". This is a way to add additional fields based on a users specific answers. 

There's no feature to just have a user "add more" fields, however we could use dependent fields and a custom checkbox property to get around this. 
We could create a custom property for "add additional fields" which lists all the additional fields available, we can then set dependent fields to display if any of these values are selected. 

For example we could say "add more in the field placeholder" when I click it I'm shown a list of checkboxes, let's say they are "Address, Company size, Job Title, Home Phone". We can then set a dependent field to say "When Address is checked show the address field" "When company size is checked show the company size field" and so on. Meaning when someone checks any or all of these checkboxes the form will show new fields on the form based on the ones they've checked. 

It is a bit a workaround and may get messy if you have a lot of fields you want to add but it would be the only way to achieve this without custom code! 
It would look something like this in the editor: 

TomM2_0-1683369168384.png




Hope this helps! 


Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.