Home › Forums › General Issues › Dynamically registered (via PHP) relationship fields return no results › Reply To: Dynamically registered (via PHP) relationship fields return no results
The other possibility is that at the time of the ajax request that ACF/WP does not know what the post ID is of the post you’re checking the other values on. This may or may not be available. It will certainly not be in the global $post as this is not set during an ajax request. To be honest, now that I think about this, the current post ID may not event be available during the acf/init hook, depending on what admin page is being loaded. How are you getting the post ID to check the values of the other fields?
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.