we’re using a system where i can reject or approve any entry but I would like to see what is the exactly the change that user makes before making an approval.
we found something like this to test
GFCommon::log_debug( 'gform_after_update_entry: original_entry => ' . print_r( $original_entry, 1 ) );
GFCommon::log_debug( 'gform_after_update_entry: updated entry => ' . print_r( $entry, 1 ) );
the idea is we’ll be to compare the original entry with a change/update made in the same entry.
let us know if this makes sense and if this is something we could solve
The action you probably want to hook your code to is gform_after_update_entry. The ’ Log the entry before and after update.’ section shows something very close to what you are trying to do. With some formatting, you could likely use array_diff to compare the two entry arrays and then GFAPI::update_entry_field to store the result back into the entry so your approval/decision can see it or be used in merge tags with a notification.
Two other plugins that you may want to look at depending on how complex your approval or tracking requirements are.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.