Home › Forums › Add-ons › Gallery Field › Gallery Field options per image › Reply To: Gallery Field options per image
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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.