Hi,
The plugin works on my elementor form on all my sites. But not on my popups with elementor form. Any suggestions on how to fix this?
]]>Hi,
Thank you for this very good plugin. It is doing a good job but I am facing an issue in it. The name of an apartment building is suggested but not apartment numbers E.G “spectrum, blackfriars road m3 7bp” is suggested but not “spectrum, apartment 100 blackfriars road m3 7bp”. Can you please help me regarding this? What thing I am missing? I am using it with UK addresses. Thank you.
]]>Hi, first of all I like this plugin, good job and thanks!
I am using Elementor Pro and I could not get things to work. However I have a similar plugin on another site and I remember that I had the same issue. What I had to do was activate the Google Maps API as well as The Google Places API. So I did this and it works fine on an Elementor form widget. However In the console it shows this error:
” Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading”
Not sure if this is bad? However my other site with a different plugin shows the same error and I have had that running for years. Maybe you can give some info as to what it is?
The other issue which I have not been able to sort out, is that it will not work on an Elementor Popup template. Maybe you have a fix for this?
Sorry I cant give you a link to my site as it’s maintenance mode as I am building it.
Thanks again and hope you have a couple of answers.
Cheers, Just
]]>Unable to make the plugin work with the different form plugin
I tried with forminator with the reduction of the class id. in the dev console i have these messages
Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js
simple-address-autocomplete-public.js?ver=6.3:53 Uncaught ReferenceError: id is not defined
at simple-address-autocomplete-public.js?ver=6.3:53:29
Is it possible to only display results that are city and country?
So rather than
111 Streetaddress, city, state, country
It’s just
City, Country
Hi. This plugin looks very promising but I’m getting console errors and as a result it doesn’t work
js?ver=1.0:249 You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.
Oea @ js?ver=1.0:249
js?key=API HERE&libraries=places&ver=6.2.2:156 InvalidValueError: not an instance of HTMLInputElement
_.be @ js?key=API HERE&libraries=places&ver=6.2.2:156
js?key=API HERE&libraries=places&ver=6.2.2:21 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘Hy’)
at js?key=API HERE&libraries=places&ver=6.2.2:21:111
I am using the correct form ID’s and my API is valid. Any ideas?
]]>Any way to get it to work with fields in the admin post edit screens?
I tried adding it to admin_enqueue_scripts but it must be missing something else as it is not triggered for the ACF field I added the ID for. I think it would be a nice feature to be able to use it in the backend too.
add_action('admin_enqueue_scripts', 'simple_address_autocomplete_enqueue_google_maps_api_key', 10);
]]>
Couldn’t get things working with Ninja Forms, field ID was nf-field-7 but nothing was happening. Had a look and the fields variable was being populated by nf-field-7-container (and only that). Reading the code it looks like it’s been set to populate an array with all fields that start with any of the given entries set in Field IDs but is stopping at the first one.
Changed the following lines in simple-address-autocomplete-public.js to get things working. No idea if this will break other installs with different forms/multiple fields that need checking but it fixed this one (change in both was to remove the ^ so it only looked for exact IDs).
Line 43:
fields = document.querySelector(
[id="${inputValues[i]}"]
);
Line 54:
]]>const fields = document.querySelectorAll(
[id="${inputValues[i]}"]
);
The Formilator form building plugin generates different field IDs each time the page refreshes. So inputting the ID doesn’t work because it is different the next time the form loads.
Does anyone have any workaround or solution?
]]>Setup everything as per documentation (API key, field ids, everything), but it simply doesn’t work. Console doesn’t show any error. Can’t figure out why it is not working.
]]>Plugin doesn’t allow me to save after installation and has this error message after Restriction Type on the setup menu:
“There has been a critical error on this website. Please check your site admin email inbox for instructions.
Learn more about troubleshooting WordPress.”
Everything including plugins are up to date, and I have cleared the WP and browser cache.
The error message in the email is:
WordPress version 6.1.1
Active theme: Zita (version 1.5.8)
Current plugin: Simple Address Autocomplete (version 1.2.0)
PHP version 8.0.27
Error Details
=============
An error of type E_ERROR was caused in line 416 of the file /var/www/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php. Error message: Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, string given in /var/www/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php:416
Stack trace:
#0 /var/www/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php(416): array_search(‘biased’, ‘biased’, true)
#1 /var/www/wp-admin/includes/template.php(1785): Simple_Address_Autocomplete->field_callback(Array)
#2 /var/www/wp-admin/includes/template.php(1739): do_settings_fields(‘simple_autocomp…’, ‘general_setting…’)
#3 /var/www/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php(59): do_settings_sections(‘simple_autocomp…’)
#4 /var/www/wp-includes/class-wp-hook.php(308): Simple_Address_Autocomplete->simple_address_autocomplete_settings_page_content(”)
#5 /var/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)
#6 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 /var/www/wp-admin/admin.php(259): do_action(‘settings_page_s…’)
#8 /var/www/wp-admin/options-general.php(10): require_once(‘/var/www/wp-adm…’)
#9 {main}
thrown
Hi and thanks for your greate plugin !
I have this error in the settings page of the plugin :
Fatal error: Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, string given in /home/clients/client-number/sites/my-website.com/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php:416 Stack trace: #0 /home/clients/client-number/sites/my-website.com/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php(416): array_search(‘biased’, ‘biased’, true) #1 /home/clients/client-number/sites/my-website.com/wp-admin/includes/template.php(1785): Simple_Address_Autocomplete->field_callback(Array) #2 /home/clients/client-number/sites/my-website.com/wp-admin/includes/template.php(1739): do_settings_fields(‘simple_autocomp…’, ‘general_setting…’) #3 /home/clients/client-number/sites/my-website.com/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php(59): do_settings_sections(‘simple_autocomp…’) #4 /home/clients/client-number/sites/my-website.com/wp-includes/class-wp-hook.php(308): Simple_Address_Autocomplete->simple_address_autocomplete_settings_page_content(”) #5 /home/clients/client-number/sites/my-website.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #6 /home/clients/client-number/sites/my-website.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /home/clients/client-number/sites/my-website.com/wp-admin/admin.php(259): do_action(‘settings_page_s…’) #8 /home/clients/client-number/sites/my-website.com/wp-admin/options-general.php(10): require_once(‘/home/clients/0…’) #9 {main} thrown in /home/clients/client-number/sites/my-website.com/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php on line 416
In my browser console, I have this error :
Loading the Google Maps JavaScript API without a callback is not supported
I don’t know if it’s the same origin but it’s certainly possible?
I have tried to filled the field “Biased Search Coordinates” but impossible to save the setting and when I reload the page, the setting disapear.
I hope this ticket help you to fix this bug.
Have a good day!
]]>Hi, I’ve followed the instructions on this blog post but I’m getting the following error in the inspect tool. Please can you help?
<input size="1" type="text" name="form_fields[address]" id="form-field-address" class="elementor-field elementor-size-sm elementor-field-textual pac-target-input gm-err-autocomplete" placeholder="Sorry! Something went wrong." required="required" aria-required="true" onfocus="initAutocomplete()" autocomplete="off" disabled="" style="background-image: url("https://maps.gstatic.com/mapfiles/api-3/images/icon_error.png");">
]]>
The Settings page ends at:
Restriction Type
There has been a critical error on this website. Please check your site admin email inbox for instructions.
Learn more about troubleshooting WordPress.
---
These error details were sent in an email to the site Admin.
Error Details
=============
An error of type E_ERROR was caused in line 416 of the file /home/acovrecleaning/livedev2/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php. Error message: Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, string given in /home/acovrecleaning/livedev2/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php:416
Stack trace:
#0 /home/acovrecleaning/livedev2/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php(416): array_search()
#1 /home/acovrecleaning/livedev2/wp-admin/includes/template.php(1785): Simple_Address_Autocomplete->field_callback()
#2 /home/acovrecleaning/livedev2/wp-admin/includes/template.php(1739): do_settings_fields()
#3 /home/acovrecleaning/livedev2/wp-content/plugins/simple-address-autocomplete/includes/class-simple-address-autocomplete.php(59): do_settings_sections()
#4 /home/acovrecleaning/livedev2/wp-includes/class-wp-hook.php(308): Simple_Address_Autocomplete->simple_address_autocomplete_settings_page_content()
#5 /home/acovrecleaning/livedev2/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#6 /home/acovrecleaning/livedev2/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /home/acovrecleaning/livedev2/wp-admin/admin.php(259): do_action()
#8 /home/acovrecleaning/livedev2/wp-admin/options-general.php(10): require_once('/home/acovrecle...')
#9 {main}
? thrown
---
Thank you.
]]>
Hello! I’m trying to get your plugin to work with Easy Digital Downloads during the Checkout page. Here’s the HTML of the address box and its ID:
<input type="text" id="card_address" name="card_address" class="card-address edd-input" placeholder="Address line 1" value="">
However, when I insert card_address at the form id in your plugin, autocomplete doesn’t work as expected.
Any ideas on how to troubleshoot this?
]]>