Skip to main content
Emad Radwan
Troubleshooter
Troubleshooter
April 22, 2024
Solved

Text field validation

  • April 22, 2024
  • 2 replies
  • 464 views

Is there a way to create a Text field that will automatically calculate “Date of Birth” to 18 years or above?

Best answer by JohnSantos

@Emad Radwan 

Yes, you can achieve this in DocuSign by using Formula fields to build formulas based on date fields in your documents. When the recipient completes the underlying fields, the Formula field automatically calculates and displays the result.

Here’s a high-level overview of how you might set this up:

  1. Create a Text field for the Date of Birth input.
  2. Validate this field as a date.
  3. Create a Formula field that calculates the difference between the current date and the Date of Birth field. You can use the DateDiff function for this.
  4. The DateDiff function calculates the number of days between two dates2. To convert this to years, you might divide by 365.25 (accounting for leap years).
  5. Finally, you can create a condition in the Formula field to check if the calculated age is 18 or above.

You can find more information here Calculating Days and Dates (docusign.com)

2 replies

JohnSantos
Guru
Guru
April 22, 2024

@Emad Radwan 

Yes, you can achieve this in DocuSign by using Formula fields to build formulas based on date fields in your documents. When the recipient completes the underlying fields, the Formula field automatically calculates and displays the result.

Here’s a high-level overview of how you might set this up:

  1. Create a Text field for the Date of Birth input.
  2. Validate this field as a date.
  3. Create a Formula field that calculates the difference between the current date and the Date of Birth field. You can use the DateDiff function for this.
  4. The DateDiff function calculates the number of days between two dates2. To convert this to years, you might divide by 365.25 (accounting for leap years).
  5. Finally, you can create a condition in the Formula field to check if the calculated age is 18 or above.

You can find more information here Calculating Days and Dates (docusign.com)

Welcome to the DocuSign Community! Your feedback is highly valued. If you find my response helpful, please give it a "Like" and consider marking it as the "Best Answer" to assist others with similar issues.
Emad Radwan
Troubleshooter
Troubleshooter
April 22, 2024

@JohnSantos thank you!