(→Examples) |
|||
| (One intermediate revision not shown) | |||
| Line 40: | Line 40: | ||
?> | ?> | ||
</pre> | </pre> | ||
| + | |||
| + | == Placement == | ||
| + | |||
| + | This code should be placed in the '''functions.php''' file of your active theme. | ||
== Source Code == | == Source Code == | ||
This filter is located in ''common.php'' and ''js.php'' | This filter is located in ''common.php'' and ''js.php'' | ||
Latest revision as of 22:37, 19 June 2011
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
<?php
add_filter("gform_address_zip", "change_address_zip", 10, 2);
?>
Applies to a specific form. In this case, form Id 5
<?php
add_filter("gform_address_zip_5", "change_address_zip", 10, 2);
?>
Parameters
$label
- (string) The label to be filtered.
$form_id
- (int) The current form's id.
Examples
This example changes the default address zip label;
<?php
add_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 common.php and js.php