I have a strange issue with getting data from options page.
I have 2 select fields
In my options page I have list of countries and areas for each country.
When user selects country, I get list of all areas for selected country from options page via AJAX, and then I populate second select.
When I try to get a list inside my AJAX function like:
$get_locations = get_field( ‘locations_area’, ‘options’ );
Instead of array of areas I get number: 7 (there are 7 areas).
Looks like this started to happen after I have updated to ACF pro latest version.
– I include ACF inside theme folder
– As far I can see from DB, what I get returned as a value is field from options table ‘options_locations_area’
So looks like the function for getting repeater field values is not loaded fully at this point.
thanks for answer, but this was not the problem.
problem was when I used get_field to retrieve values, i got wrong values returned.
it is on my localhost but somehow it works now, not sure what happen.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users