Do you want to prevent unwanted form submissions? The best way to do this is to make your WordPress form password protected.
In this article, we’ll show you two ways to password protect WordPress forms.
Here are some quick links so you can check out which method you want to use to password protect your WordPress forms:
- How to Password Protect Your Form in the WordPress Editor
- How to Password Protect Your Form Using the Form Locker Addon
Why Password Protect WordPress Forms?
Password protecting your WordPress forms prevent unwanted form submissions. This way you can ensure that only authorized people can access your WordPress forms.
Let’s take a look at a possible use case of protecting your form with a password.
Imagine that you’re accepting guest post submissions on your blog using the Post Submissions addon. The Post Submissions addon allows you to accept user generated content like a blog post or any other form of content on the front-end of your site without allowing users to log into your admin area.
If you allow everyone to access your post submissions form, chances are you’ll receive a lot of low-quality articles. By password protecting such a form, you can prevent unwanted guest post submissions. That’s because only people with the password will be able to submit their content.
Doing this prevents you from wasting your time reviewing content you’ll never use.
Now let’s take a look at how to password protect your forms in the WordPress Editor.
How to Password Protect Your Form in the WordPress Editor
Follow these steps to password protect your forms in the WordPress editor.
Step 1: Create a New Form in WordPress
Next, you’ll need to create a new form. Using our post submission form example, see our tutorial on how to create a post submission form.
Once you’ve customized your form to meet your needs, add it to a post or page on your website. For help with this step, check out this tutorial on how to add a form to your WordPress content.
Step 2: Password Protect Your Form
Once your form is created, and published on a WordPress post or page, go to the WordPress dashboard and access the place your form has been published.
In the Publish box, found in the WordPress Editor, edit the visibility of the page by clicking Edit and choosing the option Password protected.
In the Password field, enter the password you want to set. Then click OK, and update the post.
Now you can give the people you want filling out your form on your website, and posting content, the password so they can view your protected page and submit their form. And remember, you can do this for any WordPress form you create on your website.
Now let’s take a look at how to use the WPForms Form Locker addon to password protect your WordPress forms.
How to Password Protect Your Form Using the Form Locker Addon
Follow these steps to password protect your WordPress forms with the Form Locker addon.
Step 1: Create a New Form in WordPress
Next, go to WPForms » Addons and find the Form Locker Addon.
Install and activate the Form Locker addon.
Once your WPForms Form Locker addon is active, you’ll need to create a new form. Using our post submission form example, see our tutorial on how to create a post submission form.
If you want to create a different type of form on your website, and protect it with a password, check out the Form Templates Pack addon and choose from over 100 pre-designed templates.
Step 2: Configure Form Locker Settings
After your form is customized to meet your needs, go to Settings » Form Locker in the Form Editor.
To password protect your newly created form, select the Enable password protection checkbox under the Password section.
When you do this, a new screen will appear where you can configure the password protection settings.
These form settings include:
- Password: this is the password people will be required to enter before submitting a form on your website.
- Display Message: this is the message that will appear above the Password field so people know that your form is protected and requires a password to submit.
This is what your password protected WordPress form will look like on the front-end of your site:
Once the correct password is entered, your WordPress form will appear for your site visitor to fill out and submit.
The great thing about this option is that you don’t have to protect the entire page with a password, like you do when you password protect forms using the WordPress Editor.
Instead, people can still view the content, such as a blog post, without having to have a password. Your site visitors will only need the password if they want to submit the form. This improves the user experience and makes you more transparent.
After all, people don’t want to feel like you are hiding content from them.
How to Hide the Page From Search Engines
To keep away unwanted users from accessing the page you’ve added a password protected form to in search results, you might also want to hide the page from search engines.
To do this, find your robots.txt file and add the following code to it. Make sure to replace /your-page/ with your page URL in the code.
User-agent: * Disallow: /your-page/
For more details, you can read how to hide a page from search engines.
How to Hide Your Post From Your Homepage
If you’re embedding the password protected form in a blog post, you might also want to hide that post from appearing on your homepage, while still allowing others to view it if they have the URL.
To hide the post from your homepage, you can use the plugin WP Hide Post. After activating the plugin, go to the post edit screen where you’ll find a new meta box labeled ‘Post Visibility’.
Click the checkbox near Hide on the front page. Now, only people with the exact URL to your webpage will be able to see your form. Otherwise, when someone visits your website, they will not see the post with the form on your homepage.
And there you have it! You now know how to password protect WordPress forms in two very easy ways.
If you’re accepting guest posts on your blog, you can read these 4 tactics to attract more guest article submissions. And if you’re interested in learning about other ways to prevent unwanted form submissions, check out this detailed guide to building spam-free WordPress contact forms.
And if you still aren’t sure WPForms is for you, check out what others have to say about the most beginner friendly contact form builder on the market today.
So, what are you waiting for? Get started with the most powerful WordPress forms plugin today.