Add hidden fields to your Contact Form 7

Contact Form 7 is a WordPress plugin that allows you to capture website leads.

With Leadsources, you can track the source of the leads generated in Contact Form 7, alongside 6 other lead source data.

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

Step 1: Open the form #

Log in to the backend of your WordPress website.

On the left panel, click on “Contact“.

Click on the form you want to edit.

Step 2: Add the hidden fields #

To add a field to your form, click on your form, at the place where you want to add your hidden field. In this example, we are adding the hidden fields right about the submit button.

Click the “text” field that you will find above the form. The edit pop-up opens.

As Name, right Channel. And as Default value, write [channel].

Click “Insert tag“. The text field is added to the form.

To make this field hidden, simply write “hidden” at the beginning of the tag.

For example:

  • If you tag is [text Channel “[channel]”]
  • Then, write “hidden” as follows: [hidden text Channel “[channel]”]

Repeat this step by adding a total of seven hidden fields containing the respective following values:

NameDefault value
Channel[channel]
Source[source]
Campaign[campaign]
Term[term]
Content[content]
Landingpage[landingpage]
Landingpagesubfolder[landingpagesubfolder]

Don’t forget to add the “hidden” part on every field.

You should have a form that looks like this:

[hidden text Channel “[channel]”]
[hidden text Source “[source]”]
[hidden text Campaign “[campaign]”]
[hidden text Term “[term]”]
[hidden text Content “[content]”]
[hidden text Landingpage “[landingpage]”]
[hidden text Landingpagesubfolder “[landingpagesubfolder]”]

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 Contact Form 7 submissions page, alongside the form’s responses (name, email, etc.).

What are your feelings