What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Limit age or validate birthdate

    Asked by klawzeus 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?

    limit age validate birthday
  • Profile Image
    JotForm Support

    Answered by EltonCris 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!