Skip to main content
Participant
November 1, 2016
Question

How to Format a credit card field by card type?

  • November 1, 2016
  • 1 reply
  • 1003 views

How do a format a text field in a PDF form to use the correct spacing depending by card type?


For example, American Express cards (14 characters, starts with a 3) should have 4,3,3,5 spacing and formatted like so:

3xxx xxx xxx xxxxx

Visa (Starts with a 4), MasterCard (Starts with a 5), and Discover (Starts with a 6) all have 15 characters with 4,4,4,4 spacing and be formatted like so:

4xxx xxxx xxxx xxxx - Visa

5xxx xxxx xxxx xxxx - MasterCard

6xxx xxxx xxxx xxxx - Discover

Is there a text field script that can do this type of task?

I am currently using Adobe X Pro

Thank you in advance.

1 reply

Participant
April 19, 2022

is this not possible?

try67
Community Expert
Community Expert
April 19, 2022

Yes, it's possible, but will require a custom format script to be written.

Participant
March 7, 2024

It a common question, so needs an actual responce.