Every field can be a little different in ACF. You actually need to target the field that’s being altered by ACF, and is some cases that’s not the field that you see. In the case of a gallery field, it appears that there is an hidden input field for each image, and it also appears that when adding a field that a new input is added to the list.
I’m going to be guessing here and you’re going to need to do some testing to figure it out, but my guess is that you’ll need to have something that is triggered on the “append” action. I have not worked with detecting changes in a gallery field, so I’m not even sure where to begin. This may be a case where you have to look at it from a different angle than what I do in a lot of those examples. I’m not sure where to start looking.
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!
© 2022 Advanced Custom Fields.