gform_notification_enable_cc

Description

The “gform_notification_enable_cc” filter allows the display of a carbon copy field when creating a notification.

Usage

The following would apply to all forms:

add_filter('gform_notification_enable_cc', 'your_function_name', 10, 3 );

To target a specific form, append the form id to the hook name. (format: gform_notification_enable_cc_FORMID)

add_filter('gform_notification_enable_cc_21', 'your_function_name', 10, 3 );

To target a specific form and notification, append the form id and notification id to the hook name. (format: gform_notification_enable_cc_FORMID_NOTIFICATIONID)
NOTE: The notification id may be found in the browser URL as the value for “nid”.

add_filter('gform_notification_enable_cc_21_5ade0502ec70f', 'your_function_name', 10, 3 );

Parameters

  • $enable_cc bool

    Indicates if the the CC (carbon copy) field should be displayed.

  • $notification Notifications Object
    The current notification object.

  • $form Form Object
    The form object.

Examples

add_filter( 'gform_notification_enable_cc', '__return_true' );

Placement

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

Since

This filter was added in Gravity Forms version 2.3

Source Code

This filter is located in GFCommon::send_notification() in common.php and GFNotification::get_notification_ui_settings() in notification.php