Ok quick update (I’m working for my own stuffs only the week-end)
I’ve been able to capture the right event when clicking on the “Add Size” button.
In fact, this was pretty simple lol:
Based on John’s examples, here is the new code:
var myACFextension = acf.ajax.extend({
events: {
'click [data-key="field_5831de130046f"]': '_state_change',
},
_state_change: function(e){
alert("Add Size is clicked!");
}
});
Now, I just need to write the code that will grab all images from the related gallery and populate my “Image reference” dropdown field.