-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict with Google Maps when using validation Address fields #2041
Comments
Just to confirm, is this using the Google Maps plugin, or just literally adding an embedded (iframe) map from Google. If the latter, I'm not seeing any errors there. |
Hi, it's the Google Maps Javascript API for the Google Map. This is the error we receive when trying to implement both Formie and the Map: You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. |
This might be tricky in practice, because we need the The Google Maps plugin will load the JS API with the following:
While Formie will load:
I'm not exactly sure how we can combine these two calls, if it all. While we can certainly add handling to see if the Google JS API is already loaded, that's not going to work in this case, because despite it being there, it doesn't include the I suppose in an ideal world, both Google Maps and Formie would have a setting where you can manually load the Google API yourself, but then there's the trick of different settings, different callbacks, etc. |
Describe the bug
When using a Formie form containing address validation (using the Google API) on a Craft entry that ALSO has an embedded Google Map, the Google API throws an error due to two versions of the Google Maps JavaScript API being loaded. Since the Google Maps is a simple embed there is no way to specify for it to NOT load the library. We wanted to see if there was a way to tell Formie to NOT load the Google Maps JavaScript API additionally to prevent the error?
Steps to reproduce
Form settings
Craft CMS version
Craft version: 4.6.0
Plugin version
Formie version: 2.1.21
Multi-site?
No
Additional context
No response
The text was updated successfully, but these errors were encountered: