Limit age or validate birthdate

  • Profile Image
    klawzeus
    Asked on February 09, 2015 at 10:39 AM

    I'm creating an application form, but applicants must be 18 years or older. Is there a way to validate the date field where it cannot accept dates less than 18 years prior to today?

  • Profile Image
    EltonCris
    Answered on February 09, 2015 at 11:56 AM

    Hi,

    That's possible with calculation along with conditions.

    Example: http://form.jotformpro.com/form/50394355620958? (Submit button appears when age is greater than 18. you can also show any text so the user will be aware of it.)

    Clone this form so you can figure out the setup. This is done using Date/Time Tool under Quick Tools and a Form Calculation under Widgets.

    You can check the calculation formula when you open the calculation wizard by clicking the wand icon.

    Notice the Today date field, Age field and the Days Field are set as hidden (right click then hide field). They are used in calculation. First I calculated the days by subtracting the present date to the birth date then divided it with 365.25 (equivalent for 1 year [shows more accurate result]).

    After that, create a condition that hides the submit button if age is less than 18.

    Example:

    Let us know if you need further assistance. Thank you!