what is a wpforms hidden fielld

What Is a WPForms Hidden Field? (Discover Hidden User Data)

Editorial Note: We may earn a commission when you visit links on our website.

Few things in life are as exciting as discovering secrets.

WPForms has a secret field of its own. And it’s largely ignored by new users because they’re not sure if it serves any purpose at all.

If that sounds like you, then I must say – you’re missing out!

The WPForms hidden field is invisible to visitors, but it can be incredibly valuable to you by letting you collect useful metadata with a user’s entry.

You can set up the hidden input field to collect information like locations, IP addresses, referrer URLs, and all kinds of fun stuff from people who fill out forms on your website.

In this post, I want to share some common ways that you can use the Hidden field to gather some really useful information, all without affecting user experience.

Unlock the Hidden Field Now

What Is the Purpose of the Hidden Field?

A hidden form field is a field that you can add to your forms without making it visible to users.

In WPForms, this field is simply called the Hidden Field. This hidden field can capture information from the form user using WPForms’ Smart Tags without them being able to edit or see it at all.

Adding a Hidden field to a form

Why would you want to use a WPForms Hidden Field?

Smart Tags collect information that may be useful for you to see in an entry, but would likely be confusing to a visitor if they could see that field while filling out the form.

Embedding Smart tags in hidden fields allows you to offer the best user experience while getting the information you need.

It may not make sense for your visitor to provide this information directly to you, but you can still capture it.

WPForms Hidden Input Field Hacks

So, now that you know what a WPForms Hidden Field is, here are some awesome ways to use it:

1. Find User IP Addresses

Every user has a unique IP address. Capturing IP Addresses can be especially helpful for fighting form spam.

When you see which IP Address is sending you spam, you can block that address from accessing your site through your hosting company or a security plugin.

To capture the IP address of a user submitting an entry, add the Hidden Field to your form, then click on it to open its Field Options.

Hiddel field settings

It can be helpful to rename the Hidden Field, so there isn’t any confusion later about what information this field contains. So feel free to change the Hidden Field label.

Changing field label

Then, click on the Advanced tab to open further options.

Advanced settings

Now, the Hidden Field needs to be given a default value. To do this, you can use Smart Tags, so that the default value is dynamically updated depending on each individual user.

Click on the Show Smart Tags link to the right of the Default Value box.

Show smart tags

You’ll see a bunch of available Smart Tags that you can use. Because we want to capture the IP address information, click on User IP Address from the list.

User IP address tag

With the User IP Address smart tag in the Hidden Field, you’ll be able to see the IP address of the visitor in their form entry.

user ip address

2. See How People Found You

The {url_referer} Smart Tag will capture the page address that referred the user to your form.

For example, if a user was on your home page and then navigated to your contact page before filling out your form, the {url_referer}  Smart Tag would show you the URL of your home page.

URL referrer

This is a great way to add traffic source details to every entry, allowing you to learn more about how people are discovering your forms.

referral url

You can this information to make better optimization decisions for your site and boost form conversions.

3. Track Campaigns With Custom Links

You can also use hidden fields to track referrals from external sources or a specific marketing campaign.

To do this, simply add a Query String Variable Smart Tag to the Default Value box of your Hidden Field.

query string valuable

You should now see the {query_var key=""} added to the Default Value box. To properly set up this tag, you’ll have to enter a key representing the traffic or campaign source you want to track.

For this, it’s important to modify the URL of the page where you’re embedding the form.

For example, let’s assume that your form page URL is yoursite.com/contact/. Now, if you wanted to promote the contact form from your Facebook page, you can use a modified link that looks something like this:  yoursite.com/contact/?source=facebook.

As you can see, this link uses the standard URL of your form page and adds something extra to help track the source easily. Using this example URL, the query string key we need to enter between the quotation marks is “source”.

hidden field query variable

However, depending on your specific URL tracking conventions, you’re free to use a different query string key.

When a user visits your form by clicking any one of the example links below, the form will capture the source as defined by your URL.

  • Facebook — yoursite.com/page/?source=facebook
  • Twitter — yoursite.com/page/?source=twitter
  • Email Newsletter — yoursite.com/page/?source=newsletter

This way, you can easily track a campaign or any specific external source.

source entry

In fact, it might be a good idea to receive entry notifications with link tracking information.

To set that up go to Settings » Notifications. From there, scroll down to the section labeled Email Address, then click on Show Smart Tags at the top right of the message box.

email message show tags

Select your Hidden Field label from the Available Fields list. We’ve labeled our Hidden Field as “Source”, so that’s what we’ll be selecting in this example.

source smart tag

It will add some code to your notification that looks like {field_id="#"} with a number.

email message body with smart tag

Click Save and your form is ready to be published on a post or page.

The final step for this tip is to share the link to the page that contains this form. For each platform you share the link on (Facebook, Twitter, etc.), you’ll want to add the source to the end of the link.

That way, WPForms can recognize it and correctly pull the source information with each entry.

4. Find User Locations

If you’re already loving the Geolocation addon that lets you see where your users are located, you might want to consider using the entry geolocation Smart Tag in a Hidden field.

Just open the options for your Hidden field and select the Entry Geolocation Smart Tag from the options for the Default Value.

location variable

You can also add this Smart Tag in a notification email so you don’t have to sign in to your dashboard and form entry to find it. This can be particularly useful if you need to know users’ time zones for phone calls.

Just open the Smart Tags list for your email notification message and choose Entry Geolocation.

location message field

Did you know that the Geolocation addon has another purpose? It can also be used for address autocomplete on your forms!

Address field with Google Map

Just connect it to Google Places or Mapbox and you’ll be able to turn on address autocomplete for any form. You can even add an interactive map to your forms so users can drop a pin to choose their locations.

5. Assign User IDs

Want to be able to identify who your visitors are but don’t want to ask for their names? No problem! You can still identify visitors with a unique ID.

Every registered user is automatically assigned an ID number on your WordPress site. Adding a Hidden Field with a User ID Smart Tag allows you to see the ID when a logged-in user submits a form.

User ID

This can be especially helpful if you’re creating an anonymous survey and want to see which users filled it out.

6. Track Form Submissions by Page

Many of our customers use the same form across many different locations. For instance, you could have a newsletter signup form at the bottom of every blog article.

When you have a setup like this, it can be challenging to track the source page where entries for the same form are coming from.

An easy way to see source page information with every entry is to use the Embedded Post/Page Title Smart Tag.

Embedded page title

This Smart Tag will silently capture the title of the page or post where the form submission occurred, so you can always see this information with every entry.

And that’s it!

Now you know what the WPForms hidden input field is, and some clever ways to use it. Next, here are a few more pointers on using smart tags in WPForms.

Bonus: More Ways to Use WPForms Smart Tags

We’ve just shown you 5 different ways to use the hidden field and smart tags to create powerful forms.

There is a little more you can do with smart tags even without using the hidden field. Here are some examples, next.

7. Block Specific Email Addresses

If you get hit by a lot of spambots, you can stop contact form spam with Google reCAPTCHA or hCaptcha.

But what about the spammers that are real, human visitors?

There’s a neat feature in WPForms that lets you easily lock down your forms to the email addresses that you specify. It’s called the Allowlist/Denylist.

You’ll find it by clicking the Advanced tab in the Field Options settings for your email address field.

email allow deny

Click the field to open a dropdown menu with Allowlist and Denylist as options. You can use the Allowlist to only allow the email addresses you type in.

Or, flip it around and choose Denylist to make the form accept all entries except for the email addresses you specify in the settings.

Simply enter the email you would like to block in the field below.

email deny list

The next time the spammer comes back to submit the form, they’ll get stopped in their tracks.

8. See the Pages Driving Form Conversions

When you publish a form on your site, your ultimate goal is to get more form conversions: entries, leads, or sales.

If you know which pages are driving those conversions, you can develop more content that benefits your visitors and inspires them to act.

Here’s the great news. You can easily unlock this information with the User Journey addon for WPForms.

User Journey addon overview

Under every form entry, you’ll see a list of actions the user took before filling out your form. The addon is the perfect tool to create a user journey map. It records each user’s behavior automatically and shows it in the entry, right in WordPress.

You can retrace your visitors’ steps from the moment they hit your site to the point they submitted the form. And the addon even lets you see:

  • What the visitor searched for
  • The UTM parameters for the referring campaign
  • How long they spent on each page or post

User Journey addon for WPForms

WPForms also lets you measure form conversions with Facebook Pixel or Google Analytics. But sometimes it takes a while to wade through all of that data.

If you want to quickly understand what makes your visitors tick, the User Journey addon is the perfect solution.

Next, Create a Coupon Code Field for Your Order Form

And there it is! You now have some great hacks for using the WPForms form builder hidden field to find extra data about your form users.

If you want to add even more custom fields to your forms, read about how to add a coupon code field next.

And if you’d like to learn more about getting rid of spam with WPForms, here’s our guide to stopping bots from filling your forms.

Unlock the Hidden Field Now

So what are you waiting for? Get started with the most powerful WordPress forms plugin today.

And if you liked this article, then please follow us on Facebook and Twitter for more updates from our blog.

Using WordPress and want to get WPForms for free?

Enter the URL to your WordPress website to install.


  1. How is it possible to edit the hidden field in backend? I know I can use the “Notes” in backend but I want to have different “Notes”-fields.

    1. Hey Peter,

      To achieve what you have mentioned, you can add a Single Line Text Field and add the CSS class wpforms-field-hidden — This way the field will be hidden in the frontend but can be accessed and edit in WordPress Admin Dashboard.

      Hope this helps! 🙂

      1. Hi Nikhil, Is there any way to retroactively edit hidden field data that was already collected?

      2. Hey David – We currently don’t have the feature to edit hidden fields information. I do agree that this would be a great feature, and I’ll add this into our feature request tracker so that it’s on our developer’s radar.

  2. Can we get IP address with custom code added to the plugin, without having to upgrade to the pro?


    1. Hey Pramodh, if you don’t want to upgrade to a paid version right now, you may try creating a custom smart tag for the user IP in the way mentioned here or you can go with custom development Codeable or WPBuffs. Thanks.

    1. Hey Haryo – Thanks for your comment. I apologize, but I’m not sure I understand your question. When you get a chance, could you please share more details, or possibly an example of what you’re looking to do?

      Thanks 🙂

  3. Hi, I have more than 400 email addresses that I want to use for notifications, do i have to type them in one by one or are there any other alternatives of bulk capturing e.g import email addresses from excel?

    1. Hey Allan – If you’d like to send email notifications to 400 emails, I apologize we currently do not have the option to import the email address, and you’d need to add them manually. I do agree this would be great, and I’ll add this into the feature request tracker.

  4. Hi, i want to ask something.. i have field #1 (ex. name) and a hidden field
    Is it possible to show the value of field #1 on the hidden field?


    1. Hi Mel – We currently don’t have the feature to show field values in the hidden fields before submitting the form. I do agree that this would be a great feature, and I’ll add this into our feature request tracker so that it’s on our developer’s radar.

      Thanks 🙂

    1. Hello Megan – Yes, you can absolutely pass the date/time to the entries by using smart tags within a hidden field as outlined in this doc. Then you just need to map the field with your Google Sheet. That’s it 🙂

      Hope this helps. Thanks!

  5. Hi guys,

    I would like to add a list of the uploaded files to confirmation email sent to the user.
    They often ask to see this list as a confirmation.


    Thank you for uploading your files:

    File one.doc
    File two.png
    File three.xlm

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.