gform_address_zip

gform_address_zip

DescriptionUsageParametersExamplesPlacementSource Code

Description
This filter is executed when creating the address zip field and can be used to modify the 「Zip」 label.
Usage
Applies to all forms
1add_filter( 'gform_address_zip', 'change_address_zip', 10, 2 );
Applies to a specific form. In this case, form Id 5
1add_filter( 'gform_address_zip_5', 'change_address_zip', 10, 2 );
Parameters

$label string
The label to be filtered.

$form_id integer
The current form』s id.

Examples
This example changes the default address zip label:
1234add_filter( 'gform_address_zip', 'change_address_zip', 10, 2 );function change_address_zip( $label, $form_id ) {    return "Address Zip";}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in js.php and GF_Field_Address::get_field_input() in includes/fields/class-gf-field-address.php.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注