Are you looking for an easy way to restrict your WordPress form submissions to logged-in users only?
If you have a membership site, online store, or another type of website that has registered users, then you may want to restrict certain form access to only logged-in users.
In this article, we will show you how to restrict your WordPress forms to logged-in users only.
When and Why Do You Need to Restrict Access for WordPress Forms?
There could be a number of scenarios when you would need to restrict access to certain WordPress forms to logged-in users only.
- You may be hosting a private members event, and you only want registered users on your site to RSVP.
- You may restrict access to support for members only, and by restricting it to logged-in users only, you can dynamically populate certain information from their profile.
- You might want to run an employee survey or poll, and you want to restrict access to your internal team only.
- You are running a customer NPS survey that you only want to be submitted by logged-in users only.
- You might have a special prize claim form that you want to be accessed by only certain logged-in users.
These are just some examples, but there could be literally hundreds of other use cases where you want to restrict form access to registered users only.
With that said, let’s take a look at how to restrict your WordPress form access to logged-in users only. We’ll cover 3 easy ways, so you can click the links below to jump ahead to any section.
Method 1: Restrict Form Access with WPForms Form Locker Addon
This method is the easiest and most powerful, so we recommend it for all beginner users. We will use the WPForms plugin and their Form Locker addon to completely lock down WordPress form access.
WPForms is the best WordPress form plugin used by over 5 million websites. It was created by WPBeginner’s founder, Syed Balkhi, to have all the features we needed to run our business.
The first thing you need to do is install and activate the WPForms plugin. For more details, see this step-by-step guide on how to install a plugin in WordPress.
Upon activation, you need to go to WPForms » Settings from your WordPress dashboard and enter your license key. You can find the key under your WPForms account area.
After that, you’ll need to activate the Form Locker addon.
Simply head over to the WPForms » Addons page to install the Form Locker Addon.
Now you’re ready to create a new form that has restricted access for logged-in users.
To do this, go ahead and create a new form by going to WPForms » Add New.
This will open the WPForms form builder where you will be presented with the option to either choose a form template or start with a blank one.
You can start by entering a name for your form at the top and then selecting a form template.
WPForms drag & drop form builder is extremely easy to use, so you can add or remove fields and customize the form to your liking.
Plus, there are further options to customize each form field in the template.
Once you have added all the necessary fields, you need to go to the Settings Tab.
From here, click on the ‘Form Locker’ settings.
On this tab, you will see the option to enable password protection for your WordPress forms, set total entry limits, enable form scheduling, and enable restricting entries to logged-in users only.
Go ahead and click the toggle for ‘Logged in users only.’
Once you check the box, you will see a new Message field.
This is where you will need to draft a message that will appear to all users who are not logged in to your site.
Once done, you can tweak other form settings that you might need and then save your settings.
Now you can embed this form on any WordPress post or page on your site by using the WPForms block or a shortcode in the WordPress block editor.
Simply edit or add a new post or pages. Then click on the + icon to add a WPForms block.
Once the WPForms block is added, select your form to embed from the dropdown menu, and you’re done. Congratulations, you have successfully created a WordPress form that’s restricted to logged-in users only.
Method 2: Restrict Form Access with Password Protected or Private Pages
Another way to restrict form access in WordPress is by using the default WordPress visibility settings. You can use this method with the free version of WPForms or any other contact form plugin.
Simply create a Page or Post where you want to embed the form. After that click on the ‘Status & visibility’ settings on the right panel.
You have the option to either make the whole page private or make the whole page password protected.
Private pages can only be seen by the Administrators and Editor level users on your website.
If you set a password for the page, then you will have to share that password with everyone to who you want to give access.
While this method works, there are several downsides to it.
First, the entire page is hidden not just the forms area. You lack the finer controls, and there’s no way for you to see which logged-in user submitted the form.
Method 3: Use Advanced Membership Plugins to Restrict Form Access
If you’re using an advanced WordPress membership plugin like MemberPress, then it comes with a lot of access control features built-in.
You can see our detailed guide on how to create a membership site for more details.
To restrict access, you can simply go to MemberPress » Rules to create a new permissions rule.
The rule edit page allows you to select different conditions and associate them with a membership plan.
For example, you can select all content that matches a particular tag or category to be available only to members with the silver subscription plan.
You can also create more specific rules. For example, a single post or page, child pages, or a specific URL.
Once you have set the rules, you can use it in combination with any WordPress contact form plugin to restrict form access to logged-in users only.
For more details, see our step-by-step guide on how to restrict content access in WordPress.
We hope this article helped you learn how to restrict your WordPress forms to logged-in users only. You may also want to see our list of best WordPress plugins for business websites and how to choose the best WordPress hosting service.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Have a question or suggestion? Please leave a comment to start the discussion.