Do you want to restrict WordPress forms to only logged-in users on your site?
If there are certain parts of your website that you only wish to be accessible for your subscribers or registered users, then it may be a good idea to restrict some forms to logged-in users only.
Thankfully, it’s very easy to enforce access restrictions on your WordPress forms.
In this article, we’ll show you how to restrict your WordPress forms to make sure your form entries only come from users who are logged in.
Create Your WordPress Form Now
How to Restrict WordPress Forms to Logged-in Users
The best way to restrict WordPress form access is to use WPForms, a user-friendly plugin that allows you to set access restrictions in just a few minutes.
In This Article
Let’s begin the step-by-step tutorial.
Step 1: Install WPForms
WPForms was designed to make it super simple for beginners to build awesome forms fast. Besides, it has tons of addons that enhance your form functionalities, like controlling user access restrictions.
So we’re going to use WPForms to first create a form and then enforce user access restrictions to logged-in visitors only.
But first, we must install the WPForms plugin to your WordPress site. Head over to WPForms and purchase a plan. Please bear in mind that the Form Locker addon (which we need to set user permissions) is only available in Pro and above plans.
Note: Actual pricing might not be accurately reflected in the image above. Please visit the pricing page to see current pricing details.
Once you’ve purchased the plan, you can proceed to install WPForms on your site. If you don’t know how, see this tutorial on installing a WordPress plugin,
Step 2: Install and Activate Form Locker Addon
After installing WPForms on your WordPress site, we’ll now install the Form Locker addon. This feature will allow you to change user permissions for any form you create with WPForms.
To install Form Locker, open your WordPress dashboard and go to WPForms » Addons on the sidebar menu.
In the next window, type in “Form Locker” in the search field located on the top-right. Click on the Install Addon button when Form Locker Addon shows up in search results.
This will instantly install the Form Locker Addon for your WPForms plugin, and the Status will now read “Active“.
You can now enforce access restrictions on your forms.
Step 3: Create a New Form with WPForms
Now, we’re going to create a new form and add access restrictions to it. You can use any of the 2,000+ form templates to create a form that best suits your goals. Plus, all form templates support access restrictions.
To start creating a form, hover your cursor over WPForms in your WordPress dashboard’s sidebar and then click on Add New.
Now, pick a template of your choice by clicking on the Use Template button that appears when you hover your cursor over a template. For this tutorial, we’re using the Fitness Interest Form, but you can use any as per your preference.
This will open the Form Builder screen where you can edit the fields or add new ones to customize your template.
The right half of the screen displays the live preview of your actual form. You can add new fields by dragging and dropping these from the left side to the right-hand panel.
Also, you can access options like Move, Edit, Delete, and more by moving your cursor over each field in the right-hand panel.
Once you’ve customized your form, you can change access restrictions so only logged-in users can see your new form.
Step 4: Change Access Restrictions with Form Locker Addon
Now, click on Settings on the left-hand bar of your form builder. Then, click on Form Locker.
Here, you can choose different ways of restricting form access to your users. If you want to restrict form access to only logged-in users, click on the toggle button next to “Logged in users only“.
You can also add a message that will display when those users who aren’t logged in try to access your restricted form.
The message is also a good place to add quick links that users can click to register or log in to your site.
Next, simply click on the Save button on the top-right to finish creating your WPForms with access restrictions.
You can view your WPForms entries right on your WordPress dashboard. Or you can also see submissions in WordPress database since WPForms performs WordPress data collection automatically for you.
And there you have it! You now know how to restrict access to logged-in users only on your WordPress forms.
Why Restrict Access to Your WordPress Forms?
There are many reasons why you might want to restrict some of your WordPress forms to logged-in users on your site.
Take a look at some examples:
- You may be hosting a members-only event that is off-limits to non-registered users.
- You may have a special promo code or other surprises that you only want to reveal to your logged-in subscribers.
- You’re running a giveaway campaign that is only open to those who have registered on your website.
- You want logged-in users to access your customer support ticket form to submit queries and complaints.
These are only a few common scenarios where you might want to create restricted forms. But it’s entirely up to your marketing strategy how you want to target different features and services of your site to different levels of users.
Create Your WordPress Form Now
Next, Protect Your Forms From Spammers
Do you want to make sure your WordPress entries aren’t polluted by spammers? See our guide on adding Captcha to WordPress forms to prevent spam.
You might also want to add the Save and Resume functionality for your form users. Check out our article on how to save progress on WordPress forms to learn more about this useful feature.
Ready to build your form? Get started today with the easiest WordPress form builder plugin. WPForms Pro includes lots of free templates and offers a 14-day money-back guarantee.
If this article helped you out, please follow us on Facebook and Twitter for more free WordPress tutorials and guides.
Hello.
How to allow to admin can see, fill and test locked forms by IP while need to send another test form on live site?
Thanks.
How do we display only the logged-in user form entries in WPForms? Just the logged-in user entries in the front end. We get the method to display all logged-in users but not the only one who is logged in. Is there any way to do so?
Hey Muhammed, for this you can use user attribute as oulined here in the format
[wpforms_entries_table id="FORMID" user="current"]
.I hope this helps.
Is there a way so that when a user registers, it captures specific data during that process (such as email address, location, time zone) and that data will automatically fill-in data fields in the form? I would like to have certain data that a customer can set with their registration rather than have to fill out the same data every time they enter a form (which can be a large number of times per user)
Hey William – You can absolutely do that by using hidden fields. Under the hidden fields, you can use these smart tags!
That way, you will be able to get the data without taking any input from the form submitter/user.
Thanks 🙂
I used the form locker but my question is where to put it to direct users to fill it out.
Hello Alix – Thanks for reaching out. Once you are done with the form creation, just embed the form on the page you want by following this doc.
Hope this helps.
In case you are facing any issues, as you are using a paid version of WPForms, you have access to our email support, so please feel free to submit a support ticket.
Thanks 🙂