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
Age restriction options are found in the Access Control settings which is accessible from the Form Dashboard.
Clicking it will open new set of options. There are multiple access control restriction settings here. We’ll discuss them one at a time:
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.
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:
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.
And to the users:
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.
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:
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!
- RegistrationMagic Starter Guide - August 4, 2024
- WordPress Registration Shortcodes List - July 10, 2024
- WordPress Payment Form Guide: Setup Payments on Registration Form - July 8, 2024
- Experience the Unfolding Magic! - August 4, 2023
- List of Guides for WordPress User Registration Process - July 28, 2023
- Frequently Asked Questions About WordPress User Registration Forms - July 28, 2023
- How to display registration forms on WordPress site? - July 26, 2022
- WordPress User Registration Custom Status Guide - April 9, 2022
- How to add or update user profile fields using WordPress forms - August 5, 2020
- Boost RegistrationMagic User Profiles With ProfileGrid Integration - February 19, 2019
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.
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.