How to auto select dropdown option based on the year of date field?

  • chloethecreative
    Asked on August 9, 2017 at 9:37 PM

    So I'm making a registration form for a soccer club and they separate their divisions by birth year rather than age. Is there a way to autofill a field when an option in another field is selected? For example, if a parent says their child was born in 2012 in the "birth date" field, the "division" field will automatically input the U6 division? 

     

  • Ashwin JotForm Support
    Replied on August 10, 2017 at 2:33 AM

    Hello chloethecreative,

    Yes it is possible to achieve your requirement by taking advantage of our conditions feature to select dropdown option based on the selection of date field. You may like to take a look at the following guide which should help you:  https://www.jotform.com/help/268-Conditional-Logic-Inserts-Text-Calculation-Into-A-Field

    Please take a look at the following cloned form where I have added the required condition and see if this is what you wanted to achieve: https://form.jotformpro.com/72211131338948

    I added condition to check the year of of the date field and then selected "U6" value in dropdown fields. Please check the screenshot below:

    How to auto select dropdown option based on the year of date field? Image 1 Screenshot 30

     

    If the date is within year 2012, it will automatically select U6 in "Division" dropdown. Please check the screenshot below:

    How to auto select dropdown option based on the year of date field? Image 2 Screenshot 41

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!