Skip to main content
Conversation Starter
May 8, 2024
Solved

Adding the phone number field to a template

  • May 8, 2024
  • 11 replies
  • 7126 views

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

NOAHLNJNew VoiceAnswer
New Voice
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}$

Docusign Employee
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!

New Voice
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!

Yaryna Y.Conversation StarterAuthor
Conversation Starter
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}$

 

New Voice
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!

 

New Voice
July 12, 2024

Forgot the preview screenshot.

Thanks!

 

Yaryna Y.Conversation StarterAuthor
Conversation Starter
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. 

Docusign Employee
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
Established Contributor
July 17, 2024

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

 

Denise