Credit card fields are special field types for entering credit card numbers. They provide the following benefits over using normal text input fields:
- Automatic formatting for credit cards.
- Card type detection.
- Automatic value hashing to prevent storing credit card numbers in the WordPress database.
- Additional validation when linked to credit card expiration and credit card CVC fields.
Credit card fields are a new feature in Caldera Forms 1.5
Note: All of our payment processors are designed to prevent storing credit card numbers in the WordPress database, since doing so would be a massive security issue. Credit card number fields provide this extra security for use with custom processors. This measure can not be removed without forking Caldera Forms.
These field make use of Stripe’s payment.js library. Thanks Stripe!
Using Credit Card Number Fields In Caldera Forms
To add a credit card number field, drag the New Field icon into the form layout editor where you want it to appear. This opens a modal that allows you to choose fields. Select the eCommerce section and then click on Credit Card Number. You must then give your field a name.
All other settings fields are optional. In addition to the standard field options of a text field, there are two special options:
- Expiration Field – Use this option to link the credit card number field to a credit card expiration field. This will require a that the chosen expiration field has a valid expiration date in order for the credit card number field to be considered valid.
- Secret Code Field – Use this option to link the credit card number field to a secret code (CVC) field. This will require a that the chosen secret code field has a valid expiration date in order for the credit card number field to be considered valid.