Home › Forums › Backend Issues (wp-admin) › Load dynamically fields on select change › Reply To: Load dynamically fields on select change
Hi @jepser
Can you please check your console log in combination with debugging your code to check the value of each line of code.
i think the issue may be this:
global $post;
$current_template = get_post_meta($post->ID, 'custom_post_template',true);
In an AJAX call, there is no global $post
Take a look at ACF’s core location code to see where it gets’ it’s $post_id from
Thanks
E
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.