Description
Fires after the notification is successfully saved.
Usage
add_action( 'gform_post_notification_save','your_function_name', 10,3 );
Parameters
- $notification Notifications Object
The notifications object.
-
$form Form Object
The current form.
-
$is_new_notification bool
True if this is a new notification. False otherwise.
Example
add_action( 'gform_post_notification_save','notification_saved', 10,3 ); function notification_saved( $notification, $form, $is_new_notification ){ if ( $is_new_notification ) { $message = 'A new notification was created for form id ' . $form['id'] . ' - ' . $form['title']; } else{ $message = 'A new notification was updated for form id ' . $form['id'] . ' - ' . $form['title']; } GFCommon::send_email( '[email protected]', '[email protected]','','','New Notification', $message ); }
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms version 1.9.16.
Source Code
This filter is located in GFNotification::notification_edit_page() in notification.php.