Blog

Restrict WordPress Registrations by Age and other Parameters

How to restrict WordPress registrations by age and other parameters?

WordPress Registrations By Age and Other Parameters

Welcome to our tutorial on how to restrict WordPress registrations by age (or other parameters). Every membership site has its own set of parameters. Among the most common of them, is age based restrictions. It means asking users to first enter their date of birth or declare that they are of certain age before filling up the form. See fair share of them, don’t we? Now let’s see how to restrict WordPress registrations by age on our own WordPress site (and perhaps learn a few new tricks along the way!). This is all the more important, when it involves user registrations. RegistrationMagic has built in support for form access control, allowing greater control over who fills out the registration forms.

Related Articles
  1. How to Restrict User Access by Date in WordPress
  2. How to Restrict WordPress User Access by Passphrase Code
  3. How to Restrict WordPress Forms by User Roles

Age restriction options are found in the Access Control settings which is accessible from the Form Dashboard.

Restrict WordPress Registrations by Age -1

Clicking it will open new set of options. There are multiple access control restriction settings here. We’ll discuss them one at a time:

Restrict WordPress Registrations by Age -2

1. ENABLE DATE BASED FORM ACCESS CONTROL

Turning this one on will ask users to enter a date before the form shows up (given the date matches the criteria we set up in next steps). Remember, this date is not necessarily a birth date, and we can customize it to fit any date based criteria. Although it will most commonly be used that way.

First option is “Question for asking date”. It’s the question which our visitor will see above the date text box. Let’s type in “Please enter your date of birth to proceed”. Next is “Limit Type”. It has two options – to set the input date within a range of years relative to present day. For example, if we only wish to allow registrations for users between 18 to 60 years, we will have to set the Lower Limit as 18 and Upper Limit as 60.

Restrict WordPress Registrations by Age - 3

Alternatively, if we wish to allow users who fill in a date between two specific dates, we should choose Absolute Dates option. This will turn Upper Limit and Lower Limit boxes into date input box where we can set date range.

Here’s how the form will look to the user:

Restrict WordPress Registrations by Age - 4

A note – If you do not need either upper or lower limit for a form, just leave it blank.

2. ENABLE PASSPHRASE BASED FORM ACCESS CONTROL:

This is as straightforward as it sounds. We can create a custom passphrase, and only those who have it shall be able to fill the form after entering it. Something like secret entrance code. The passphrase can be distributed using a newsletter or within autoresponder of another of our forms, or by multitudes of other methods.

“Question for asking passphrase” serves same purpose as the question in date range setting. “Passphrase” is actually the phrase we want to use. Without being too fancy, we’ll just use a random string of characters in our demo.

Restrict WordPress Registrations by Age - 5

And to the users:

Restrict WordPress Registrations by Age - 6

3. ENABLE PUBLIC ONLY ACCESS CONTROL:

This is quite a simple one. It has no additional options to configure. You can just check this checkbox to make the form accessible to non logged-in users. The form will then be not accessible to logged-in users.

4. ENABLE USER ROLE BASED FORM ACCESS CONTROL:

This restriction is fundamentally different from the above ones. It requires visitor to be logged in already before being able to fill up the form. In that sense, it cannot be used for first time registrations. But comes handy, if we use multiple roles on the site and wish specific forms to be accessible to certain user roles. A user whose role does not matches will see a denial message that can be customized below.

Restrict WordPress Registrations by Age - 7

So what happens if we turn on more than one restrictions at a time? Well, they’ll all be shown on same page and verified before filling up the form. Here’s an example:

Restrict WordPress Registrations by Age - 8

4. ENABLE USER ROLE BASED FORM ACCESS CONTROL:

This access control type limits users by their email domain. Check the checkbox for “Domain based form access control” and you’ll see the “Domain” option appear below it. You can add the allowed domain here. This is useful in situations where you need to have user registrations only from a predefined network. For example, if you only need users from @myfootballteam.com to register, then you can add “myfootballteam.com” in the domain textbox. Then users with other email domains will not be able to submit the form.

 

That wraps up our demonstration to setup access control and restrict WordPress registrations by Age and various other parameters. Until next time!

About RegistrationMagic

RegistrationMagic Editorial Staff (rmagic) is a team of WordPress registration experts and major contributor to the development of RegistrationMagic - WordPress User Registration Plugin.
Subscribe
Notify of
guest

2 Comments
Inline Feedbacks
View all comments
Eric
Eric
8 months ago

Where is this now? This post is 6 years old an I am struggling to find this feature. Feels like I have looked Everywhere to no avail.

RegistrationMagic
Admin
RegistrationMagic
8 months ago
Reply to  Eric

Hi Eric,

You can find the Access Control features inside form Dashboard -> Access Control settings.

We will update the content on this post to match the latest UI of the plugin soon.