How to use dependent form fields

Last updated: April 4, 2018

Applies to:

Marketing Hub: Basic, Pro, Enterprise

As a marketer, you need an easy way of qualifying potential customers by quickly asking for more information within the same form. With dependent form fields, marketers can easily ask further qualifying questions based on previous answers. For example, if a business only sells to clients in the north east, you can qualify form respondents by country and state.

  • You can set up dependent form fields on individual questions within a form. Please note that dependent form fields are available for Marketing Basic, Professional and Enterprise users only.

  • You can have one level of depth with your questions; however, you can have multiple dependency rules. This means you can set multiple rules to display different dependent fields for each possible response to the original field. For example, if a visitor selects United States as their country, you could display city, state, and zip code as dependent fields. If a visitor selects Canada as their country, you could display city, province, and postcode as dependent fields instead.

  • Dependent form fields can be used within HubSpot hosted pages as well as embedded (external) pages.

  • No other fields can exist in the same row as a dependent field.

Create or select a form

From your HubSpot Marketing dashboard, navigate to Contacts > Forms and either open an existing form or create a new form.

Edit your dependent fields

Once in your form, hover your mouse over the field you want to add dependencies to and click Edit

In the Configuration window on the left, you'll be presented with different settings for your form field. Scroll down to the bottom and click Dependent field to expand this option. In the example below, we're setting up dependent fields for the country field, so it starts with "If Country." 

1. This dropdown has many options: is equal to, is not equal to, contains, doesn't contain, starts with, ends with, is not empty. The options displayed will depend on your form field type.

2. This area is where you'll want to place the value that the visitor will enter into the form. So when you ask what country they're from, this is looking for anyone who says "United States."

3. This dropdown decides which field to show depending on the criteria you've set from the previous steps. So, in this example, if the visitor selects "United States" as their Country, it will then show the State/Region field for them to also fill out.

When you're done, click Add to confirm the new dependent form field. 

You can add another rule if you want to build out more dependencies for this particular field. 

View your dependent form fields

After you set up your dependent form fields, you'll see that the dependent field connected to the field that it is dependent on with a dotted line. In the example below, you can see State/Region tied to Country and that State/Region will only show if Country is equal to United States. You can click Close dependent field options to hide the dependent field(s) while you're viewing and editing your form.

Save your form

Click Save when you're done.

Test your form

At the top, click Test to see an interactive preview of the way your form will look on a live page. 

HubSpot Help article screenshot

Was this article helpful?

If you still need help you can get answers from the , or to contact support.

Previous article:

Next article: