Yes, I’d say that has something to do with it.
I’m not sure what direction to go with that information. You somehow need to set the post id. Without knowing more about what you’re doing, and really just guessing here…
well, I’ve started to type several suggestions and removed them. As I think about them as I start typing I run into road blocks. The main problem here is that the ajax request is being done by ACF. You somehow need to find a way to make ACF send the correct post ID during the request. I’ve done a lot with custom AJAX queries for ACF fields, but I’ve never been able to alter the AJAX requests that ACF is already doing.
There is only one thing that I can think of and that would be to pass the post ID in your ajax request and use that to set the post ID value when calling acf_form(), and I haven’t got a clue if this will work. But if it does then maybe ACF will either pass the correct post ID or it might be available in $_POST.
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!