On the admin side of Gravity form, I want to add a note if an admin user changes the status of the form entry. I have an admin only field so that bit is working and I know how to add note.
But can't work out, how to add note only if a certain field is changed. I need it to say something like 'status was updated from "approved" to "closed" by xxx'
Any help would be much appreciated.
Thanks.
add_action( 'gform_after_update_entry', function ( $form, $entry_id ) {
$current_user = wp_get_current_user();
$note = 'status updated from' . $status_from . ' to ' . $status_to . ' by ' . $current_user;
RGFormsModel::add_note( $entry_id, $current_user->ID, $current_user->display_name, $not );
}, 10, 2 );