PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Age check with the date field

  1. antonsamper
    Member

    Hi guys,

    Is there an easy way to create an age check with the gravity forms date field? I'm kind of stuck at the moment because i cant apply conditional logic to the date field.

    the main purpose of this is to use gravity forms for competitions where the user needs to be a minimum or maximum age i.e. for school promotions (over 11 and under 16) or on the other hand alcohol promotions (over 18s only).

    Is this feasible?

    Posted 13 years ago on Wednesday August 18, 2010 | Permalink
  2. antonsamper
    Member

    Hi guys,

    Just to clarify, the user would visit a page and would see the 'enter competition' section. In order to enter they would first need to enter their date of birth. If they are for example older than 18, they would then see the rest of the form, if not, a message would appear saying that they are not old enough to enter

    Posted 13 years ago on Thursday August 19, 2010 | Permalink
  3. The datepicker is straight from the jQuery UI library and you can pass a variety of parameters to that to exclude dates, set ranges, etc.

    You could set a minimum date/range for their birthday, etc. Eventually, we plan to add some of these parameters as built in options on the date field. For now, you can read up on the links below for the info you need.

    http://docs.jquery.com/UI/Datepicker#option-minDate

    http://forum.gravityhelp.com/topic/how-to-highlight-current-date-or-future-date-in-jquery-datepicker#post-5606

    Posted 13 years ago on Thursday August 19, 2010 | Permalink
  4. I'm wondering something similar except I'd like to tie the conditional logic in based on the age of the person. For example If a user is 18 or under show one part of the form if they are 18 or older show another part of the form. I was wondering how one would do this?

    Posted 12 years ago on Friday July 29, 2011 | Permalink