Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Restrict Your WordPress Forms to Logged-in Users Only

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

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 with registered users, 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.

Restrict Form Access in WordPress

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.

For example:

  • You may be hosting a private members event and only want registered users on your site to RSVP.
  • You might restrict access to support for members only, and by limiting it to logged-in users only, you can dynamically populate certain information from their profiles.
  • 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 are 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 will 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 6 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 in your WPForms account area.

Enter WPForms license key

After that, you will need to activate the Form Locker addon.

Simply head over to the WPForms » Addons page to install the Form Locker Addon.

Install form locker addon

Now, you are ready to create a new form with restricted access for logged-in users.

To do this, go ahead and create a new form by going to WPForms » Add New.

Add new form in WPForms

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.

Choose a form template

WPForms’s drag-and-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.

WPForms Form Builder

Once you have added all the necessary fields, you need to go to the Settings tab.

From here, just click on the ‘Form Locker’ settings.

WPForms Form Locker Settings

In 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.’

Enable form restrictions for logged in user

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.

Enter a message

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 using the WPForms block or a shortcode in the WordPress block editor.

Simply edit or add a new post or page. Then click on the ‘+’ icon to add a WPForms block.

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, you need to click on the ‘Status & visibility’ settings in the right panel.

Password protect your form

You can either make the whole page private or 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 needs access.

While this method works, there are several downsides to it.

First, the entire page is hidden, not just the forms area. You won’t have access to as many controls, and there’s no way to see which logged-in user submitted the form.

Method 3: Use Advanced Membership Plugins to Restrict Form Access

If you are 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.

Add new rules in MemberPress

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 and make it available only to members with the silver subscription plan.

Add a rules set to MemberPress

You can also create more specific rules. For example, you can restrict a single post, page, child page, or URL.

Once you have set the rules, you can use them in combination with any WordPress contact form plugin to restrict form access to logged-in users only.

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 the 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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

2 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    A great yet very simple method for a customer support form that limits questions to registered users only. At the same time, it immediately occurs to me that I can create a form on the website for users who send a donation as a certain bonus for priority communication (or as an motivation to send a donation). Thanks for the inspiration.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.