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, navigate to the field you want to add dependencies to by clicking the double arrow icon.
From the pop-up window, you'll be presented with a few steps for setting up your dependent fields. You'll first see the name of the field before your options. In the example below, we're setting up dependent fields within 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. This is how you'll set the condition for how your dependent field will show up.
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.
You can add another rule if you want to build out more dependencies on this particular field.
When you're done, make sure you save your changes.
View your dependent form fieldsAfter you set up your dependent form fields, you'll see that the dependent field is nested within the field that it is dependent on. In the example below, you can see State/Region nested within Country and that State/Region will only show if Country is equal to United States.
Save your form
Make sure that you click on the Save form button when you are done so that all of your changes are saved.
Preview your form
At the top, click preview to get a glimpse of the way your form will look on a live page.