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

    How can I calculate the age of my form user and assign them to a specific divison base on their age?

    Asked by khaji on February 28, 2015 at 12:10 AM

    Is it possible to change the value of a field based on a users age/date?

    For instance, I am creating a form for registration and want to add users to a specific division based on their age. I have field called birthday as a date field and a dropdown field with a list of divisions. As an example, if someone is 10 years or younger they should be in my kids division but someone 18 or older should be in my adult division.

    date field dropdown field calculate age specific divison
  • Profile Image

    Answered by mayur5478 on February 28, 2015 at 01:38 AM

    If you can calculate the age of the user , then you can use conditional logic on that calculated value to update your drop down list.

    Use a number field in which you get calculated value of age of the user . Then use conditional logic as below on the number field. In the below case , division is the name of the drop down list.

    Thanks,

    Mayur

     

     

  • Profile Image

    Answered by Sean on February 28, 2015 at 07:05 AM

    Conditional logic statements with the aid of the form calculation field can be used to achieve this. Rather than using a drop down menu, a text box would be used to store the division the user would be assigned to.

    You can take a look at my test form - you can clone it if you wish:
    http://form.jotformpro.com/form/50582914256963 

    You should add 2 date fields to the form - one to store the birthday and other to store the current date. If you wish you can hide the current date field from the user and only display the birthday field.


    You should add a Form Calculation widget to your form and enter the formula as you see below.



    You can remove the decimal places if you wish by selecting the option that says Show Advance Options.



    Now that you have this in place, it is time for you to create your conditional logic statement to store the assigned division base on the user's age. Before doing this add a text box to your form and label it as Assigned Division after which, you should follow the instructions below.





    You should repeat this process for all the other divisions you have - each having there own conditional logic statement to assign a division associated with their age. I hope this helps. If you need further assistance, please do not hesitate to inform us.


    Thank you