Bringing up an old topic again, but I’m interested in exactly the same thing. The google map field stores the full address as a single field and the coords. Although I can look this up and finally display the city/country, it takes an additional call to Google and it doesn’t show the editor what they’re actually selecting.
A filter hook doesn’t work for the same reason: another call to google, and the JS display isn’t affected. I’ve edited acf-input.js to achieve this, but of course core edits aren’t a great idea.
Could we, along with address and lat/long, also store the rest of the components google provides so we can grab any of them?
Additionally, could we restrict the Place Types, add a location bias or restriction? Eg: Only show results for cities. Only show results within a country.
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!
© 2023 Advanced Custom Fields.