Home › Forums › Bug Reports › Google Map Causing Form Saving Bugs
I have a field group that asks for a location with a Google Map. I assign this to the User Register/Add/Edit forms. If you load the profile page and immediately try to navigate away, a popup box appears telling you that you have unsaved changes. I’m assuming this is because when the field loads, something inside the form element is changing so the browser tries to stop that.
If I remove the google map field, the problem goes away.
Normally, this wouldn’t be too much of an issue, but on the front facing version of the form, having little bugs like that can really confuse users.
Thanks!
Here’s a copy of my .JSON file for that group.
{
"key": "group_541f91135ca1d",
"title": "User",
"fields": [
{
"key": "field_5420f9d199b1d",
"label": "Display Name",
"name": "display_name",
"prefix": "",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_541f912ffa960",
"label": "File upload",
"name": "file_upload",
"prefix": "",
"type": "file",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"return_format": "array",
"library": "uploadedTo"
},
{
"key": "field_5421cb9b6d40c",
"label": "Location",
"name": "location",
"prefix": "",
"type": "google_map",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"center_lat": "",
"center_lng": "",
"zoom": "",
"height": ""
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "user"
}
],
[
{
"param": "user_form",
"operator": "==",
"value": "all"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": ""
}
Daron
5.0.9 update seems to have resolved this issue. Definitely gonna keep an eye on it though for a little while.
jk. tagging myself to see what happens. See http://support.advancedcustomfields.com/forums/topic/google-maps-js-alert/ for more info on progress.
The topic ‘Google Map Causing Form Saving Bugs’ 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
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.