Description
The gform_notification_actions filter allows you to modify the list of actions that display below the notification name on the Notifications list view.
Usage
The following would apply to all forms.
add_filter( 'gform_notification_actions', 'your_function_name' );
| Parameter | Type | Description |
|---|---|---|
| $actions | array | An array of current notification actions. |
Examples
Add a Custom Action to the Notifications List
This example demonstrates how to add a custom action to the notifications list. Note that myCustomDuplicateNotificationFunction() does not exist in this example, so the form will not actually be duplicated.
add_filter( 'gform_notification_actions', 'my_custom_notification_action' );
function my_custom_notification_action( $actions ) {
// adds a 'duplicate' action with a link that triggers some functionality on click
$actions['duplicate'] = 'Duplicate';
return $actions;
}
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 GFNotificationTable::column_name() in notification.php