Create a credit card field

Due to functional limitations of CSV documents in an Excel environment, taking credit card information on a form is more complex than it seems at first.

Adobe recommends that if you are collecting credit card information, you design your card input to capture the first 11-12 digits in a masked field, and the last four digits in a separate field that you can elect to mask or not. You can capture credit card numbers this way using any of the form creation methods as described below.

Use the drag-and-drop authoring tool

Use the screen grab below these steps for reference.

  1. Set the Field Names to be descriptive of the field.

  2. Set a Tooltip that describes the field content.

  3. Set the field as Required if necessary; it sets the red border around the field

  4. Mask the data; it's highly recommended, but requires that you capture the content of the field using the CSV export of the form data.

    Note:

    Often the last four digits are not masked, so in the second field you see that masking is deselected

  5. Set field validation; it is set as a String for two reasons:

    • If the number starts with a zero, and the validation is Number, the zeros are stripped off.
    • If you want to set a maximum number of characters, use String. Using Number as the validation only allows a range of numbers.
  6. When you set the String validation, you have the option to use Letters, Digits, or both. Credit cards in all cases use only Digits, so constrain the option to just Digits.

  7. Set the Maximum Length of the string

    • For the first field, we set the maximum length to 12. All major credit cards have 15-16 digits in the full number value
    • The second field is only four characters

Add credit card fields using text tags

If you are using Text Tags, you probably want to drop some of the optional features like Tooltip and Default Value, as they extend the footprint of the tag itself and interfere with the layout of the document. And it's likely you will want to resort to Tag shortening anyway for the smaller field. That said, your text tags would look like this:

{{*CCN1_es_:signer1:string(char=num,maxlen=12):mask}}

and

{{*CCN2_es_:signer1:string(char=num,maxlen=4)}}

In the above Tags we have the same common values as in the drag-and-drop environment (as read from left to right):   

  • The pair of curly brackets defines the width of the field on the final document.       
  • The first pair of curly brackets defines the font (height) of the field.   
  • The asterisk (*) is the flag that makes the field required   
  • The name of the field follows (shortened to CCN1 and CCN2 to minimize the footprint of the tag)   
  • The Role (signer1)   
  • The String validation that defines the character type and the maximum length of the string.   
  • The optional Masking of the value

Clearly these field sizes are much too large for the intended content, and in these cases we recommend using Text Tag Shortening which effectively allows you to define a variable value: {{$ccn2}}    with a much larger tag that is referenced on a different page:{{#ccn2=*CCN2_es_:signer1:string(char=num,maxlen=4)}}

See this article for more information on text tags and text tag shortening

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy