Add hidden fields to HubSpot Forms

HubSpot Forms is a form builder that allows you to capture leads on your website.

With Leadsources, you can track the source of the leads generated in HubSpot Forms, alongside 6 other lead source data.

In this guide, we will show you how to add hidden fields in HubSpot Forms to start capturing the source of your leads.

Step 1: Open the form #

Log in to your HubSpot Forms account.

Hover on the form you want to edit and click “edit“.

Step 2: Add the hidden fields #

Context: In this step, we set up the hidden fields one by one to store the lead source data captured by Leadsources.

Select the “Create new” tab from the left panel.

Drag and drop the field called “Single-line text” in your form. In this example, we drop the field at the bottom of the form, right above the Submit button.

As you drop the field, you are prompted to “Create a new property“.

Let’s create our first hidden field:

  • As “Label“, write Source
  • Click “Next
  • Click “Next” one more time
  • Click “Create

The edit panel opens on the left.

Switch on the box called “Make this field hidden“.

Scroll down the left panel, until you find “Default Value” –> Write [source] as the default value.

Click “done” on the top left to close the edit panel.

Repeat Step 2 to add the 6 remaining hidden fields. Here are their respective information:

LabelDefault Value
Channel[channel]
Campaign[campaign]
Term[term]
Content[content]
Landing page[landingpage]
Landing page subfolder[landingpagesubfolder]

Click Update –> Publish

You are all set!

Leadsources will capture and store the leads data in these 7 hidden fields. This data will be visible from the HubSpot Forms submissions page, alongside the form’s responses (name, email, etc.).

What are your feelings