I am trying to add values to an ACF field from a front end form. I can update most of my fields fine but am getting a little bit stuck when trying to use update_field to update a location map field.
I have used the google maps geocoding api to convert an address value into latlon co-ords and am then trying to use update_field to insert an array containing data in the following format into the field. When I check in the back end to see if it has worked it just says ‘Array’ next to the ‘find the complete address’ icon.
The data I am attempting to insert is in the following format:
Hmm, maybe I should check properly first. Turns out there was a different plugin extension being used on this project which added a field type called ‘location map’ to ACF and this stores the data in a completely different format.
Checked in the db to see how it was stored and it was simply address and latlon separated with a bar character.
Apologies if I wasted anyone’s time with this question.
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘Updating google map field using update_field’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users