Skip to main content
johnnyZ
Inspiring
April 9, 2023
Answered

Custom Formatting for Social Security Number

  • April 9, 2023
  • 2 replies
  • 2978 views

First of all, I'm running Adobe Acrobat 9 Standard.  (I know, it's old)

If anyone can tell me how to get a newer version for a "one time" fee, and does not require subscription pricing, I'd appreciate it.

 

I can use the custom formatting for SSN: 123-45-6789

But I'd like to us a formatting "pattern?" that will give me: 123 - 45 - 6789.

 

I did it for date by choosing custom date and entering: mm - dd - yyyy.

I can't figure out how to do the same for a Social Security Number.

This topic has been closed for replies.
Correct answer try67

Select the Special option under the Format tab, then Arbitrary Mask and enter into it (without the quotes): "999 - 99 - 9999"

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
April 10, 2023

Select the Special option under the Format tab, then Arbitrary Mask and enter into it (without the quotes): "999 - 99 - 9999"

Karl Heinz  Kremer
Community Expert
Community Expert
April 10, 2023

There is no easy solution as with the date: The "mm", "dd", and "yyyy" patterns have special meaning. For a custom formatting of the social security number, you need to dig a bit deeper into Acrobat's features. The following is a very simple way to accomplish this, but it does not check for a valid pattern of the SSN:

 

var groups = event.value.split('-');
var ss_num = groups.join(' - ');
event.value = ss_num;

You would use this script as a custom formatting script. If you want to do a bit more pattern matching, you could use regular expressions to make sure that you have a pattern of three digits followed by a '-', followed by two digits, followed by '-' and finally followed by four digits.