Skip to main content
Solved

Text field validation

  • April 22, 2024
  • 2 replies
  • 332 views

Emad Radwan
Troubleshooter
Forum|alt.badge.img+5

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
Forum|alt.badge.img+19
  • Guru
  • Answer
  • 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)


Emad Radwan
Troubleshooter
Forum|alt.badge.img+5
  • Author
  • Troubleshooter
  • April 22, 2024

@JohnSantos thank you!