Description
This filter is used to control the inclusion of the field label in the product name for radio and select type Product fields. It only applies to the product information which is generated during submission, which is used by notifications, confirmations, add-ons and the entry detail page in the admin.
Usage
Include the field label.
add_filter( 'gform_product_info_name_include_field_label', '__return_true' );
Parameters
| Parameter | Type | Description |
|---|---|---|
$include_field_label | bool | Indicates if the label should be included in the product name. Default is false. |
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in GFCommon::get_product_fields() in common.php.