Can the Date of Birth Year be Relative to Current Year?

  • acsys
    Asked on January 18, 2016 at 8:53 PM

    Hi,

    Is it possible to set the year drop down list relative to the current year.  For example I would like the list to read from 1961 to 1995, which is the equivalent of {CurrentYear}-55 to {CurrentYear}-25?

  • mert JotForm UI Developer
    Replied on January 19, 2016 at 4:26 AM

    Hi there,

    Yes, you can calculate the "{CurrentYear}-55"; but you need to add another "Date" field which shows the current date and "Form Calculation" widget to calculate the year between dates.

     

    1) You need to set options called "Year From" and "Year To" on "Date" field. With them, you can set the starting and ending point on "Year" dropdown.

    To do that,

    Can the Date of Birth Year be Relative to Current Year? Image 1 Screenshot 30

     

    2) Add a new "Date" field to show current date.

    3) Add a "Form Calculation" with the following setting. On the widget, the "Date" fields' values are in days, so I add a division after extraction.

    Can the Date of Birth Year be Relative to Current Year? Image 2 Screenshot 41

     

    Also, please check the example form which I made to see how it works:

    https://form.jotform.com/60182193742959

     

    If you need any extra help or encounter an error while on the process, please don't hesitate to contact us.

    Thanks.