How to Make a Password Protected Form in WordPress

Password protected forms are important for businesses that allow registrations or accept user-submitted content on their website.

Password protected forms help prevent spam submission for these businesses. This way, you don’t have to worry about sifting through unusable information. Additionally, password protected forms prevent unauthorized access which is great for businesses that want to offer online registration options to a specific set of people. 

In this guide, we’ll take a look at how you can password protect forms in WordPress. But, before we begin, let’s go over some use case scenarios for when you might want to use password protection on your online forms. 

Why you might want to password-protect forms

Whether you run an online business, sell services, or organize events, chances are you collect data through web forms. Online forms make it incredibly easy to automatically collect data from users.

Here are some examples of forms that you may need to password-protect:

  • Registration forms (event registration form). Let’s say you’re organizing a private event and you only want certain people to register for it. You can share a password with authorized attendees only via email. This is particularly great for seminars and conferences.
  • Contest submission forms. You only want a certain amount of people to enter your contest. For instance, a library organizes a spelling bee and only kids that have a library card can enter. You can send those kids the password via email or make their library card number their unique password. 
  • Feedback forms. You want to collect feedback from your team members. Ask your team members to enter a unique password to access the feedback form on your website to fill it out. 
  • Membership form (account sign-up forms). You may want to send the password to authorized people only if you run an exclusive membership program. For instance, if you’re a merchant who sells to both retail and B2B customers, provide the password to B2B wholesale buyers only. 

Other than preventing spam submissions and spending time on reviewing spam submissions, password protecting forms also prevent unauthorized users from submitting the form in the first place. As a result, you don’t have to waste time filtering out submissions from unauthorized users.

How to password protect forms in WordPress using Passster

With a better understanding of why you might want to password protect forms, let’s look at how you can set up a form and password protect it in WordPress.

Here’s what you need to get started:

Step #1: Create your form

The first thing you need to do is create a form. The easiest way to do this is by using a WordPress form plugin like Gravity Forms or Contact Form 7.

If you’re using Gravity Forms, you can head over to Forms > New Form from the admin panel. Enter a title and description for your form and click the Create Form button to continue.

Seminar registration form

From the form editor, you can add form fields to your forms such as Name, Email, Single Line Text, and more simply by dragging and dropping them into place. Once you’ve finished building your form, click the Update button to continue.

Step #2: Install the Passster plugin

Now that we’ve created a form in WordPress, we need to install the Passster plugin to password-protect online forms in a simple and easy way.

Passster

Start by getting the Passster plugin and installing it on your WordPress website. Keep in mind that if you need access to the multiple passwords functionality, you’ll have to get the premium version of Passster.

Step #3: Password-protect the form

In order to password-protect the form you just created, you’ll first need to add it to a page. Go to Pages > Add New to create a new page.

Use the Gutenberg editor to add the form to your page. If you’re using Gravity Forms, you can search for the Forms block and add that to the text editor. Next, use the dropdown menu to choose the form you created in Step #1.

Gutenberg registration form

The neat thing about the Passster plugin is that it lets you password protect forms directly from the Gutenberg editor. From your Page settings, scroll down till you reach Passster.

Configure the following settings for single password protection:

Passster single password settings
  • Toggle the Activate Protection option on.
  • Set the Protection type to Password using the dropdown menu.
  • Enter the password you’d like to use to protect the form in the Password field.

Click the Publish button to continue. Your password protected form will look something like this on the front-end:

Password protected form

And, if the user enters the correct password, they’ll be able to access the form and submit it:

Preview form

Here’s what you need to do for multiple password protection:

Password list
  • Go to Passster > Password Lists from the WordPress admin panel and click the Add New button.
  • Give your list of passwords a title e.g. Seminar Registration Form Passwords.
  • Enter the passwords you’d like to use to grant access to the password-protected form.

Pro tip: You can toggle the Expire Passwords after usage option (under Advanced Options) on to automatically expire passwords after a single use. This is particularly useful if you want to limit submissions per user. The user can only access and submit the form once.

Click the Publish button to continue.

Next, go back to the page you added the form to and configure the following settings:

Passster settings for multiple password protection
  • Toggle the Activate Protection option on.
  • Set the Protection type to Password List using the dropdown menu.
  • Use the Password List dropdown to select the password list you just created i.e. Seminar Registration Form Passwords.

Click the Publish button to continue. The benefit of creating multiple passwords is that it makes it easy to grant access to forms (and revoke access).

Pre-render contact form shortcodes

By default, shortcodes aren’t rendered in AJAX. If you don’t use the reload page (AJAX unlocking) for your password-protected contact forms then you can use Passster to pre-render the contact form shortcodes.

For example, if you’re using a contact form plugin that works with shortcodes (such as Gravity Forms or Contact Form 7) then you can set up third-party shortcodes in Passster to deliver a seamless experience to users.

How to Make a Password Protected Form in WordPress 1

Head over to Passster > Options from the WordPress admin panel to configure the third-party shortcodes settings. All you have to do is paste the shortcode of the form you’d like to display on the front-end in the Third-Party Shortcodes field.

Bonus: other ways to restrict access to forms

Other than using passwords to protect your online forms, there are also other ways that you may use for restricting content on your WordPress website:

  • CAPTCHA/reCAPTCHA. If you get submissions from bots and spam accounts, the CAPTCHA feature in Passster can help eliminate that. Once everything is configured, users will see a simple CAPTCHA box on the front-end of your website. They will have to complete it to access and submit the online form. 
  • User Role Protection. If people on your website have registered for user accounts, you can grant access to certain roles only. For example, if you have two user roles for staff members – Manager and Employee – you can choose to grant access to users with the Manager user role only.
  • Unlock Link. You can generate an encrypted link to give to your users to gain access to protected content. Whenever a user clicks the link, they’ll automatically be redirected to the page containing the online form.

Check out our in-depth tutorial for step-by-step instructions on how to restrict access to online forms using Passster.

Conclusion

By password protecting forms, you can effectively prevent spam submissions. It helps ensure that only selected people can access and submit forms. The easiest way to set up password protected forms in WordPress is by using the Passster plugin.

Using Passster, you can set up single and multiple password protection. In addition to this, it also lets you set up CAPTCHA and reCAPTCHA, user role protection, and direct unlock links.

Passster

Protect your entire website, entire pages, or just parts of your content with one or more passwords.