Do you want a way to restrict access to logged in users on your WordPress forms? If you have a website that has registered users, there might come a time when you want to allow only those that are logged in to submit your forms.
In this article, we’ll show you how to restrict access to logged in users on your WordPress forms so only those that are logged in can fill out and submit them.
Why Restrict Access to Your Online Forms?
Your website’s forms are usually available to anyone that arrives on your site. In fact, unless you have a specific reason for limiting form submissions, everyone that needs to contact you while visiting your website typically has a way.
That said, there may be times when you want only those that are logged in to your website to be able to submit your forms.
Take a look at some examples:
- When you want to see how easy it is to use your site’s registration form, you might use a survey or poll form restricted to only those that are registered and logged in
- If you’re hosting an event that is only open to registered users and creating an event registration form
- Maybe you’re hosting an event, such as an online webinar, that doesn’t require registration but rather just a simple confirmation of attendance, so you create an online RSVP form
- You want logged in users to be able to submit support requests about their experience while logged in, so you create a support ticket form that only they can submit
- If you’re running a contest that is only open to those that have registered on your website
And that’s only the beginning.
No matter the reason you want to restrict access to logged in users, read on to see how WPForms helps you do it in a just a few simple steps.
Step 1: Create a New WordPress Form
Next, you’ll need to install and activate the Form Locker addon.
To do this, go to WPForms » Addon and find the one labeled Form Locker addon.
Click Install Addon and then Activate.
Now you’ll need to create a new form.
You can enable the form restriction feature on any WordPress form you create using WPForms. That’s because we strive to make form creation as easy as possible, while still offering our customer a ton of cool features for creating one-of-a-kind forms.
For our example, we’ll create a rent receipt form using the Form Templates Pack addon.
This way, only people that log in and are ready to pay their rent can submit your rent receipt form.
For help with this addon, that has over 100 different templates for you to choose from, check out this documentation on installing and using the Form Templates Pack addon.
Once the Form Templates Pack addon is installed and activated, simply choose the Rent Receipt Form template and let WPForms create a form for you.
You can add additional fields to your form by dragging them from the left hand panel to the right hand panel.
Then, click on the field to make any changes. You can also click on a form field and drag it to rearrange the order on your WordPress form.
When your form looks the way you want it to, click Save.
Step 2: Restrict Form Access to Logged in Users
Once your form is customized and saved, go to Settings » Form Locker in the Form Editor. This will bring up the different settings you can configure for the Form Locker addon.
To start, click on the Enable restricting entries to logged in users only under the User checkbox to enable form restriction.
Once you check this box, a Message field will display.
Here, you’ll draft a message that will appear to those that are not logged in to your site that are trying to submit a rent receipt form.
You can add a simple message stating that your form is only for users that log in.
Or, if you want to boost form conversions and build your business, you can add links to your registration form and user login form so those that aren’t registered can register, and those that aren’t logged in can log in and fill out your form.
For more help with user registration and login forms, be sure to check out these articles:
- How to Display WordPress Login and Register Forms on Any Page
- User Registration and Login Forms for WordPress (Compared)
- How to Set Up WordPress Registration Redirects (Complete Guide)
- How to Completely Customize Your WordPress Login Form to Engage Users
- How to Embed a Login Form on Your WordPress Site
And there you have it! You now know how to restrict access to logged in users on your WordPress forms.
If you want to learn how to better protect your WordPress forms, be sure to check out this tutorial on how to password protect your WordPress forms.
So, what are you waiting for? Get started with the most powerful WordPress forms plugin today.