Add 'Entry is Updated' as a possible Event for Notifications

It should not be hard and extremely useful:

IMHO this simple feature would dramatically increase the back end capabilities of GF without getting into coding, and using hooks such as gform_post_update_entry

I agree that would be useful. It is possible now by using the https://docs.gravityforms.com/gform_notification_events/ filter and the GFAPI::send_notifications function https://docs.gravityforms.com/api-functions/#send-notifications. That does require code, and I understand the desire to have an easily configured event in the dropdown.

Hi Chris,

I am impressed with the promptness of your answer…

Do you consider this feature as something potentially close down the pipeline?

Because there are filters that allow for this currently, I would say this feature will not be added in the near future.

OK, here is a working solution, I hope it helps someone!

add_filter( 'gform_notification_events', 'gf_add_entry_updated_notification_event' );
function gf_add_entry_updated_notification_event ( $events ) {
	$events['entry_updated'] = __( 'Entry is updated' );
	return $events;
}


add_action( 'gform_after_update_entry', 'gf_send_entry_updated_notifications', 10, 3 );
function gf_send_entry_updated_notifications( $form, $entry, $original_entry ) {
	GFAPI::send_notifications( $form, $entry, 'entry_updated' );
}
1 Like

Thank you for sharing that.

There was a problem with

Here is the full code corrected:

add_filter( 'gform_notification_events', 'gf_add_entry_updated_notification_event' );
function gf_add_entry_updated_notification_event ( $events ) {
	$events['entry_updated'] = __( 'Entry is updated' );
	return $events;
}


add_action( 'gform_after_update_entry', 'gf_send_entry_updated_notifications', 10, 3 );
function gf_send_entry_updated_notifications( $form, $entry_id, $original_entry ) {
	GFAPI::get_entry( $entry_id ); 
	GFAPI::send_notifications( $form, $entry, 'entry_updated' );
}
2 Likes