Gform card expiration

Description

This filter is executed when creating the credit card field and can be used to modify the "Expiration Date" label

Usage

<?php
add_filter("gform_card_expiration", "change_expiration", 10, 2);
?>

Parameters

$label

(string) The label to be filtered.


$form_id

(int) The current form's id.

Examples

This example changes the default Expiration Date label;


<?php
add_filter("gform_card_expiration", "change_expiration", 10, 2);
function change_expiration($label, $form_id){
    return "Expires";
}
?>

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in common.php and js.php

Search the Documentation