Home › Forums › General Issues › Google Map field : Is there a way to extract zipcode? › Reply To: Google Map field : Is there a way to extract zipcode?
Hmm I think we are not talking about the same thing. While I create a new retailer, I have now two fields : Google maps and a text field. Is the text field supposed to be filled automatically by itself with the zipcode when I validate an address in google maps field?
I didn’t implement the text field in my template yet so I didn’t try the end-user part.
This is the code I put in my function.php file :
This is my setting in ACF :
And this is a screenshot of 1 retailer post (admin side) :
I also have to tell you I’ve made this a few years ago when the google maps field was an paying add-on called “Advanced Custom Fields: Location Field” as I entered more than 300 retailers I never tried to adapt the code to match with the new google maps field.
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.