Home › Forums › Backend Issues (wp-admin) › Custom location rule JS refresh › Reply To: Custom location rule JS refresh
Sorry John for the late reply, but I just came back to it today.
The correct code was:
$('#my_select').live('change', function(){
acf.ajax.update( 'rule_name', $(this).val() ).fetch();
$(document).trigger('acf/update_field_groups');
});
I misspelled the rule name in my code.
When I got the ajax to work, I finally noticed that the matching condition was always returning false 🙂
So finally everything works, really powerful stuff these custom location rules 🙂
Thanks
Michael
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.