Date of Birth Age Limit

4 months 2 weeks ago #305774 by target4fun
Hello,

Trying to find out if becoming a member would solve the issue I have or if I need to try to find a freelancer or some other option.

Currently what I need is the ability to only allow registration of users who are exactly 21+. I have added the field that allows only (-21) years to be shown however this does not solve the problem. Example. If you are 20 years old but 6 months from your actual 21st birthday you will be able to still register with the (-21) rule added. If I make this rule (-22) then I exclude anyone who is 21 and a few months old.

The strict nature of the training we are doing on our website is mandated by the government that users who are younger than exactly 21 be not allowed to register.

So would becoming a paid "pro" member solve this issue, is there a add on to fix my issue or would I need to try to find a free lancer or something else to solve this issue? Im ready to sign up for a paid membership if it solves this issue, but I didnt see anything on forums, website, addons that would solve my specific problem. Unless im blind and missed it if so please let me know.

Chris
4 months 2 weeks ago #305812 by krileon
You should be able to use the below for example.

Minimum Year: -110
Maximum Year: -21

Should work fine to limit users to 21 years of age or older. If you need more specific validation you could use CB Code Field, which provides Code Validation to apply custom PHP validation to fields.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
4 months 2 weeks ago #305848 by target4fun
So the example you provided is exactly what my settings have been. It does not in fact calculate the days and months at all only the years. Let me provide an example.


Example 1
Lets say you were born (aug) 08/01/1997 ... today is (july) 07/01/2018 so you are a full month from being 21 years of age, currently you are 20 years 11 months old. Yet if you have it set to -21 (years) it will allow you to register because it only controls the years in the drop down and nothing else.

With this said my question still stands from first post. Please let me know if there is something out there that could help my problem. Thanks

I will research more on this CB code field, is there a setting I could use to solve my problem or would I have to manually write code for this?
4 months 2 weeks ago #305882 by krileon
Correct, it only limits the years. It is not limiting selection by age. If you need more specific validation you'll have to add that your self likely requiring CB Code Field to add your own PHP based validation to it. There is no out of the box solution to limit date selection by age.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Moderators: beatnantkrileon
Time to create page: 0.431 seconds
Facebook Twitter Google LinkedIn