Calculating Age in the Builder

Have more questions? Submit a request

Configure fields in your form to automatically calculate age by subtracting birth date from the current date.

Calculate Age

It involves a little bit of creative work on the front-end but will do all the work for you when completing a submission. This solution requires two Date fields and three Calculation fields.

  1. Add two Date fields and three Calculation fields to the form using your preferred method.
  2. Label the first date field, "Current Date," the second date field, "Birthdate," the first calculation field, "Age in Hours," the second calculation field, "Age in Days," and the third calculation field, "Age in Years."
    Builder_Calculating Age Fields.png
  3. Select "Birthdate" to open Field Settings in the left panel, expand the Default drop down, and select No Default (Blank).
  4. Select "Age in Hours" or the orange triangle beside the field to open Field Settings.
    Builder_Add Calculation Orange Triangle_.png
    • Under Calculation, expand the first drop down and select "Current Date."
    • Click the Subtraction symbol to change the operator.
    • Expand the second value drop down and select "Birthdate."
    • Expand the Advanced menu, click the blue toggle beside Mobile Visible to hide the field on mobile.
      Builder_Calculation_Age in Hours.png
  5. Select "Age in Days" or the orange triangle beside the field to open Field Settings.
    • Under Calculation, expand the first drop down and select "Age in Hours."
    • Click the Division symbol to change the operator.
    • Move your cursor to the second value field, type "24" as a constant, and enter.
    • Expand the Advanced menu, click the blue toggle beside Mobile Visible to hide the field on mobile.
      Builder_Calculation_Age in Days.png
  6. Select "Age in Years" or the orange triangle beside the field to open Field Settings.
    • Under Calculation, expand the first drop down and select "Age in Days."
    • Click the Division symbol to change the operator.
    • Move your cursor to the second value field, type "365.25" as a constant (the .25 takes leap years into account), and enter.
    • Leave Mobile Visible toggled ON.
      Builder_Calculation_Age in Years.png

Note

The Format and Decimal Places settings will default to 0 decimal places. Calculations will automatically round up when there are 0 decimal places allowed, so allow at least 1 decimal for better accuracy. For example, a 26.6 output would be considered 27 without decimal places. Changes made in one setting will automatically be reflected in the other.

Save and Publish to test it on mobile.

Despite all the invisible supportive fields doing calculations in the background, the goal is for the form to still be clean and easy to read.

Did we answer your question?

We'd really appreciate your feedback! Please leave your suggestions for improvement in the comments or let us know what you're looking for so we can assist you better. We want to help, but we need to understand your needs!

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.