Skip to main content
Conversation Starter
May 8, 2024 2:16 PM UTC
Solved

Adding the phone number field to a template

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!

NOAHLNJAnswer
New Voice
May 8, 2024 5:18 PM UTC

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 5:18 PM UTC

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}$

Translate
Docusign Employee
May 22, 2024 7:14 PM UTC

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!

Translate
New Voice
Jul 12, 2024 5:10 PM UTC

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!

Translate
Yaryna Y.Conversation StarterAuthor
Conversation Starter
Jul 12, 2024 5:24 PM UTC

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}$

 

Translate
New Voice
Jul 12, 2024 6:08 PM UTC

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

Thanks!

 

Translate
New Voice
Jul 12, 2024 6:10 PM UTC

Forgot the preview screenshot.

Thanks!

 

Translate
Yaryna Y.Conversation StarterAuthor
Conversation Starter
Jul 15, 2024 2:04 PM UTC

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

Translate
Docusign Employee
Jul 15, 2024 3:31 PM UTC

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!

Translate
mshealy
Established Contributor
Established Contributor
Jul 17, 2024 6:46 PM UTC

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

 

Translate
Denise