3 Replies Latest reply on Jul 24, 2008 12:20 PM by gkaiseril

    Credit Card Formatting

      Hi, I have a credit card form. I want the account number to be formatted like the it appears on the card. The problem is Amex has a 4-6-5 number pattern whereas every other type has a 4-4-4-4 format. There is a radio button called PaymentType where the user chooses Amex, Visa, MasterCard or Discover. Is there a way to do an if then statement where if the user chooses Amex then the Account number format is XXXX XXXXXX XXXXX and if they choose anything else then the format is XXXX XXXX XXXX XXXX? Thanks!
        • 1. Re: Credit Card Formatting
          (Aandi_Inston) Level 1
          If all else fails you could have two credit card number fields, and
          hide one while you show the other. It's probably redundant, but I
          couldn't reply without mentioning it: since there is a credit card
          number, don't forget that if the form is to be submitted, it has to be
          https: not an http script and absolutely not an e-mail.

          Aandi Inston
          • 2. Re: Credit Card Formatting
            gkaiseril MVP & Adobe Community Professional
            You can use the custom format script in Acrobat to format the card data based on a drop down box for the type of card or if you know the numbering differences between the cards based on the inputted card number or part of the card number.
            • 3. Re: Credit Card Formatting
              gkaiseril MVP & Adobe Community Professional
              You can use the custom format script in Acrobat to format the card data based on a drop down box for the type of card or if you know the numbering differences between the cards based on the inputted card number or part of the card number. For the second item mentioned you would need to use the RegExp object.