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 forms access to only logged in users.
In this article, we will show you how to restrict your WordPress forms access so only logged in users can fill out and submit them.
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.
For example:
- 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.
If you donβt like the video or need more instructions, then continue reading.
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 Pluginthemehub 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.
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.