Beenden
  • Globale Community
    • Sprache:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

Custom Formatting for Social Security Number

Teilnehmer ,
Apr 09, 2023 Apr 09, 2023

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.

THEMEN
PDF-Dateien erstellen , JavaScript , PDF Forms
2.8K
Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
1 AKZEPTIERTE LÖSUNG
Community Expert ,
Apr 10, 2023 Apr 10, 2023
AKTUELL

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

Lösung in ursprünglichem Beitrag anzeigen

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Community Expert ,
Apr 10, 2023 Apr 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. 

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Community Expert ,
Apr 10, 2023 Apr 10, 2023
AKTUELL

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

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines