bookmark_bordergform_enable_credit_card_field

Description

Use this filter to enable/disable the built-in credit card field.

Note: The credit card field is only intended for use with a payment gateway add-on as the field values are not saved during form submission.

Usage

add_filter( 'gform_enable_credit_card_field', '__return_true', 11 );

Parameters

  • $is_enabled bool

    Value to be filtered. Use “true” to enable the credit card field. Use “false” to disable it.

Examples

This example enables the credit card field for all forms. Add the field to the form in the Form Editor.

add_filter( 'gform_enable_credit_card_field', 'enable_creditcard', 11 );
function enable_creditcard( $is_enabled ) {
    return true;
}

Placement

This code should be placed in the functions.php file of your active theme or a custom functionality plugin.

Source Code

This filter is located in form_detail.php