Skip to main content
Solved

Adding the phone number field to a template

  • May 8, 2024
  • 11 replies
  • 5789 views

Forum|alt.badge.img+2

Hi, I need to add the phone number field to a template, something like (###) ###-####. I have tried to create a custom field, but to no avail. Can anyone help me? TY!

Best answer by NOAHLNJ

Add a text field, and on the right click “validation”, click the dropdown and click custom. This will let you enter a line of code. Here is the code for the phone number. 

 

^(\\([0-9]{3}\\)|[0-9]{3}-)[0-9]{3}-[0-9]{4}$

11 replies

Forum|alt.badge.img+2
  • New Voice
  • 1 reply
  • Answer
  • May 8, 2024

Add a text field, and on the right click “validation”, click the dropdown and click custom. This will let you enter a line of code. Here is the code for the phone number. 

 

^(\\([0-9]{3}\\)|[0-9]{3}-)[0-9]{3}-[0-9]{4}$


Forum|alt.badge.img+17
  • Community Moderator
  • 2552 replies
  • May 22, 2024

Hello @Yaryna Y. ,


If you found the provided response to be a useful solution to your question, please mark it as the best answer by clicking “Select as Best” to make it easier for other users to find.


Best regards,

Nathaly | Docusign Community Moderator
"Select as Best" below if you find the answer a valid solution to your issue!


Forum|alt.badge.img+1
  • New Voice
  • 3 replies
  • July 12, 2024

Hello,

Will this code yield the same result as the SSN field? In other words, no matter how I enter a SSN number, i.e., 222-334444, or 22233444, or 222 33 4444, the SSN field will auto correct to 222-33-4444.

I would like my phone field to auto correct a phone number entry to (222) 333-4444, or at least 222-333-4444.

I tried the text custom field validation steps above, but when I enter 222333444, it does not auto correct.

Is there a different regex that will work?

Thanks!


Forum|alt.badge.img+2
  • Author
  • Conversation Starter
  • 2 replies
  • July 12, 2024

Hi there,

 

Add a text field, and on the right click “validation”, click the dropdown and click custom. This will let you enter a line of code. Here is the code for the phone number. ^(\\([0-9]{3}\\)|[0-9]{3}-)[0-9]{3}-[0-9]{4}$

 


Forum|alt.badge.img+1
  • New Voice
  • 3 replies
  • July 12, 2024

Well, I tried that but it still does not auto format when I preview the template. Is there a step i’m missing?

Thanks!

 


Forum|alt.badge.img+1
  • New Voice
  • 3 replies
  • July 12, 2024

Forgot the preview screenshot.

Thanks!

 


Forum|alt.badge.img+2
  • Author
  • Conversation Starter
  • 2 replies
  • July 15, 2024

Hi there, you’re missing the dashes. Please make sure the phone  number is entered as xxx-xxx-xxxx. Lmk if it worked. 


Forum|alt.badge.img+17
  • Community Moderator
  • 2552 replies
  • July 15, 2024

Hello @sprydo ,


I understand you would like a regex pattern to auto-correct phone numbers.

The creation of Regex patterns is outside of Docusign scope, please contact an expert in regex for assistance in creating what you need.


Best regards,

Nathaly | Docusign Community Moderator
"Select as Best" below if you find the answer a valid solution to your issue!


mshealy
Established Contributor
Forum|alt.badge.img+11
  • Established Contributor
  • 122 replies
  • July 17, 2024

You can put in a text field and use the SSN validation.

 


mshealy
Established Contributor
Forum|alt.badge.img+11
  • Established Contributor
  • 122 replies
  • July 17, 2024

mshealy
Established Contributor
Forum|alt.badge.img+11
  • Established Contributor
  • 122 replies
  • July 17, 2024