I’am looking for the exact same thing, but haven’t found the solution yet.
Beware: the below code is from the legacy version from 2015…
There is a event when an activity is saved (see full code here):
/**
* Called on post save
* @param {object} json JSON object
*/
this.on_save = function(json) {
if (typeof(Function) === typeof(this.opts.on_save))
this.opts.on_save.apply(this, [json]);
jQuery(this).trigger("postbox.post_saved", this);
};
But I don’t know how to get the data in the response. I can fetch the event like this:
$( document ).on( 'postbox.post_saved', ( e ) => {
console.log( e );
});
But the JSON-Object from the on_save
-function above is missing. Otherwise we could resend another ajax-call and save the extra fields on our own.