Add hidden fields to your Cognito Forms

Cognito 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 Cognito Forms, alongside 6 other lead source data.

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

Step 1: Open the form #

Log in to your Cognito Forms account.

From the Dashboard, open the form you want to edit.

Step 2: Add the hidden fields #

To add a field to your form, click on the + symbol on your form to open the Add Field panel on the left.

Drag and drop a Text field from the left panel to your form.

You can position the field anywhere you want in the form.

In this example, we choose to place it at the bottom of the form, right about the Submit button.

Repeat this step until you have added 7 text fields and have switched them as hidden.

Step 3: Set up the hidden fields #

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

To set up a field, select it.

On the Field Settings – Textbox panel on the left, make the following modifications for each of ther 7 fields, as follow:

Hidden field #1

  • Label = Channel
  • Default Value = [channel]
  • Show This Field –> Select Never

Hidden field #2

  • Label = Source
  • Default Value = [source]
  • Show This Field –> Select Never

Hidden field #3

  • Label = Campaign
  • Default Value = [campaign]
  • Show This Field –> Select Never

Hidden field #4

  • Label = Term
  • Default Value = [term]
  • Show This Field –> Select Never

Hidden field #5

  • Label = Content
  • Default Value = [content]
  • Show This Field –> Select Never

Hidden field #6

  • Label = Landing page
  • Default Value = [landingpage]
  • Show This Field –> Select Never

Hidden field #7

  • Label = Landing page subfolder
  • Default Value = [landingpagesubfolder]
  • Show This Field –> Select Never

Click Save.

You are all set!

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

What are your feelings