Skip to main content
Frank Sobolewski
Participating Frequently
March 25, 2024
Question

How do I get a phone number to show in a text box in the format of XXX-XXX-XXXX

  • March 25, 2024
  • 2 replies
  • 647 views

How do you format a text box to display a phone number according to the format of XXX-XXX-XXXX after they input their phone number?

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
March 25, 2024

You should use the Arbitrary mask:

 

Acrobate du PDF, InDesigner et Photoshopographe
Thom Parker
Community Expert
Community Expert
March 25, 2024

You want the format script to both correct for missing dashes?

 Place this script in the custom format event:

 

event.value = util.printx("999-999-9999",event.value);

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often