How can I conditionally present a form to my respondents based on their calculated age?

  • Profile Image
    Asked on March 09, 2018 at 05:00 PM

    I have attached the URL to my main page below.

    I have two forms in MyForms based on age of the registrant.

    How do i select the proper form based on the age ? If the registrant is 17 Years old and Younger they get one form and if they are 18 Years old or older they get the other form.


  • Profile Image
    Answered on March 09, 2018 at 06:34 PM

    It's possible to do that, you will only need to add a Form Calculation widget to perform the calculations and get the user's age. 

    Firstly, I would recommend you to set the default date to the today's date, to do it you only need to open the field settings, go to the options tab and select "current" on the default date option: 


    You may also hide the field so the user only provides his birth date: 


    Once you have done this you will only need to add the Form Calculation widget to your form with the formula (today's date - birth date)/365.25.



    Then based on the date you may change the redirection when the user submits the form. 

    Please check this guide to get more information about the date calculations that you can perform: 

    This guide will help you changing the thank you link based on the age: 

    If you want, you may also show the link to another form if you want instead of redirect the user upon the submission, this guide will help you showing/hiding elements on the form: 

    Here's a sample form as well so you can see how the age calculates: 

    If you have questions, please let us know. 

  • Profile Image
    Answered on March 10, 2018 at 08:43 AM
    When i enter the participants date of birth i get -17556.81 in the age
    field ?
  • Profile Image
    Answered on March 10, 2018 at 01:29 PM

    This may be because of choosing a wrong date as I could not replicate an issue similar to what you have shared. I have however made changes to the form to limit such error. I have made the current day field a read only to avoid users filling this field causing error.

    Kindly feel free to clone test and use the above form.

  • Profile Image
    Answered on March 10, 2018 at 02:43 PM

    Thanks Trevon. I cloned it and it works great.
    I have spent the morning reading the user guide and on the help forum
    looking for answers to my next step.
    Now that I have the participants age calculated and populates on the
    "Online Waiver Form" how do i link to the proper form in MyForms according to the
    Since the participant is over 18 Years of age, i need it to go into MyForms
    and bring up the form "18 & Over Waiver Form"
    Can this be done ?

  • Profile Image
    Answered on March 10, 2018 at 05:28 PM

    I guess your goal is to present these 2 different forms to your users based on their age:

    🔘 18 & Over Waiver Form

    🔘 17 & Under Waiver Form

    Since these are 2 separate forms, you can approach this as follows. Both methods below will require 3 forms in total - FIRST FORM will be your main form, SECOND FORM will be for the 18 and over and the THIRD FORM will be 17 and under.

    1. Either use CONDITIONS + the IFRAME EMBED WIDGET. The idea is to add 2 iframe embed widgets on your first form (for the second and third forms respectively), then conditionally show these based on the respondents calculated age.


    IF age IS GREATER THAN 18 THEN SHOW the iframe embed widget for the 18 & Over Waiver Form

    IF age IS LESS THAN 18 THEN SHOW the iframe embed widget for the 17 & Under Waiver Form

    Related guides:



    2. Or you can have your users submit the first form, then redirect them conditionally to the second or third form based on the calculated age.

    Related guide: Change-Thank-You-Page-URL-Based-on-a-Condition