Table of Contents
When and Why 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 how to restrict your WordPress form access to logged-in users only.
Method 1: Restrict Form Access with WPForms Form Locker Addon
This method is 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 2 million websites. It was created by WPBeginner’s founder, Syed Balkhi, to have all the features we needed for running 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 enter your license key and then add 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.
WPForms drag & drop form builder is extremely easy to use, so you can add or remove fields and customize the form to your liking.
Once you have added all the necessary fields, you need to go to the Settings Tab and click on Form Locker.
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.
Once you check the box, you will see a new Message field 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 click the Save button.
Now you can embed this form on any WordPress post or page on your site by using the WPForms shortcode in the Classic Editor or by using the WPForms block in the Gutenberg editor.
Simply go to Post or Pages, and then click on the Plus icon to select a block. Next, type WPForms in the block search.
Once the WPForms block is added, select your form to embed 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 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 who you want to give access to.
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 (if you’re using the password protected setting).
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 simply go to MemberPress » Rules to create a new permissions rule.
The rule edit page allows you to select different conditions and associate them to 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.