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 presentation on GoToWebinar, 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
The first thing you’ll 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.
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.
Click Save.
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.
And don’t forget, if you like this article, then please follow us on Facebook and Twitter.
Hi ,
Many wpforms users like me would like to see a frontend user dashboard add-on for easy control over the information user’s profile,the dashboard also enables a quick and single page view to all the details of user profile with out the need to go wordpress backend.
Thanks,
Hi Ibnoman — I’ve made sure to note that on our feature request list. Thanks for the suggestion! 🙂
I guess I have a different definition of User Registration. This function has no ability to restrict users access. This form also doesn’t seem to integrate with any of the Membership based plugins either. I was hoping to not have a membership plugin, since I use no functionality of a membership plugin except to restrict page access. I will keep my fingers crossed that this functionality is coming.
Hi David,
I apologize for the confusion! At the moment, the user registration addon doesn’t have this type functionality (it’s main purpose is to allow users to register and create an account on your site) but I’ve made a note on our feature request list so we can keep it on our radar! Thanks for the suggestion 🙂
Form Locker addon. is available only for paid service , its not for free . can you please suggest any plugin form that restrict only logged in users .
Hi Saranya,
I don’t have any specific plugin suggestions for doing this but I would recommend checking out this article from WP Beginner covers restricting access by IP or logged users.
I hope this helps! 🙂
Hi! This is some kind of thing I’m looking for. But can the user able to see the payment details after completion of payment like my orders page from woocommerce?
I found this https://wpforms.com/developers/how-to-display-form-entries/ but it is displaying all the user entries.
Hi Sai, thanks for the question!
Currently, there are no built-in options to display the order/payment details on the Confirmation page. Also, it is out of our support scope to help with the custom code to display only one latest form entry on the frontend. It could fail when 2 users will submit a form at the same time and they will see the wrong entry made by another user.
When a user makes a payment through your form, we receive all the payment details and save them to the form entry. However, this information is only available to the site admin.
As an alternative option, you can set up an automatic email receipt sent to the users from your Stripe or PayPal account with all the payment details.
I apologie for any inconvenience!
Have a good one 🙂
i am using the registration form i want to disable the registration form for the user who are login that means if u want to register you have to logout then only the registration form will be accessible.
Hey Mohsin- Currently, we do not have a way to hide a form if a user has already logged in users. I’ve made a note of the feature request and we’ll keep it on our radar as we plan out our roadmap for the future.
The best workaround would be to use our Form Locker addon, to require users to be logged in to access the form. Additionally, you can use Form Locker to require unique answers in the form. This way if a logged-in user attempts to fill out the form a second time using the same information as before, they will be unable to submit the form.
In case it helps, I’ve included a link to our guide on using the Form Locker addon here.
I hope this helps! If you have any other questions or need help, please get in touch with our support team.
Thanks 🙂
Hello, thanks for this amazing plugin. Quick Q, is it possible to show forms to non-logged in users only?
Like restricting access to a registration form once a user has logged in.
Hey Mike – I apologize! We don’t have the ability to show the form to logged-out users only. I’ve added a vote to our feature request list and we’ll keep it on our radar as we plan out our roadmap for the future.
In the meantime, this can be done with a bit of CSS. When you get the chance, please reach out to our Support team for further help.
Have a good one 🙂