Raza Khadim
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Address Autocomplete] Admin post edit form@mariobeach not really aimed for ACF but it should work. You will have to localize the script as well. Add this to your functions.php or through code snippet plugin:
function enqueue_simple_address_autocomplete() { // Enqueue the necessary scripts for Simple Address Autocomplete wp_enqueue_script('simple_address_autocomplete_js_scripts', plugins_url('simple-address-autocomplete/public/js/simple-address-autocomplete-public.js')); wp_localize_script('simple_address_autocomplete_js_scripts', 'simple_address_autocomplete_settings_vars', array( 'simple_address_autocomplete_google_maps_api' => get_option('simple_aa_options_google_maps_api_key'), 'simple_address_autocomplete_country_selected' => get_option('simple_aa_options_country', 'option'), 'simple_address_autocomplete_form_field_ids' => get_option('simple_aa_options_field_ids'), 'simple_address_autocomplete_bias_coordinates' => get_option('simple_aa_options_bias_coordinates'), 'simple_address_autocomplete_restriction_type' => get_option('simple_aa_options_restriction_type'), )); } add_action('admin_enqueue_scripts', 'enqueue_simple_address_autocomplete');Also, when testing I noticed a bit of lag with ACF fields. Maybe couple of clicks but did work. Maybe the site I tested is slow or ACF when working with this plugin.
I hope this helps, let me know if there are any further issues.Thanks
Forum: Plugins
In reply to: [Simple Address Autocomplete] JS Console errors@groggy72 can you share the website link please?
@snknick thanks for pointing out the issue and glad you have sorted it.
It will probably break the Forminator forms because the whole purpose of the update was to make it work for Forminator forms. I have a couple of ideas on how I can avoid this. I will try and push it as soon as I could.
Thanks.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Restriction Type – Critical Error on WebsiteI am marking this as resolved for now but do let me know if the issue persists.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Fatal error: Uncaught TypeError: array_search()I am marking this as resolved for now but do let me know if the issue persists.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Not Working for Formilator@nazmuslabs great to hear it worked for you. Thank you.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Fatal error: Uncaught TypeError: array_search()Forum: Plugins
In reply to: [Simple Address Autocomplete] Restriction Type – Critical Error on Website@gimico this issue is now resolved in version 1.2.1. Please update the plugin and let me if you still see the issue.
Thanks
Forum: Plugins
In reply to: [Simple Address Autocomplete] Not Working for Formilator@nazmuslabs I just pushed an update (version 1.2.1) now you only need to add the prefix of the field ID and it should work fine. (No need to change the code)
Please test it and let me know if it resolves the issue.
Thanks
Forum: Plugins
In reply to: [Simple Address Autocomplete] Not Working for Formilator@nazmuslabs sorry for late response, just a bit caught up with other stuff. For now, you can use a work around and I will push it next update so that similar issues don’t occur.
With Forminator, even though the ID changes the first part of the field stays the same. So you will need to choose the first part of the field ID.
For Example, the field id is “forminator-field-street_address-address-1_647580ceeb5c3”
You add the forminator-field-street_address-address-1 in the field ID list.
You also need to modify the code in the plugin.
Go to Plugin File Editor under Plugins option.
The select the Simple Address Autocomplete from top right corner.
Then click “public“
Then “js“
Then “simple-address-autocomplete-public.js“
Then remove everything after line 41 and replace with the following code.
for (let i = 0; i < inputSplit.length; i++) { inputValues[i] = inputSplit[i]; // Select the fields with the prefix using the starts with (^=) attribute selector fields = document.querySelector([id^="${inputValues[i]}"]); if (fields) { simpleAutocomplete = new google.maps.places.Autocomplete(fields, options); } } } window.addEventListener('load', function () { for (let i = 0; i < inputSplit.length; i++) { inputValues[i] = inputSplit[i]; // Select the fields with the prefix using the starts with (^=) attribute selector const fields = document.querySelectorAll([id^="${inputValues[i]}"]); fields.forEach(field => { field.setAttribute("onfocus", "initAutocomplete()"); }); } });This should work. Also remember, the plugin only supports single line address and will NOT fill the City, State, Country etc.
Let me know if this helps.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Doesn’t work with Elementor Pro form@vateko I haven’t heard back from you about this. So I will close this now but please do get back to me if you still seeing any problem.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Restriction Type – Critical Error on WebsiteHi @gimico sorry for the late reply. I can’t seem to replicate but have some theories. Will push it in the next update. Sorry for the inconvenience it may have caused.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Doesn’t work with Elementor Pro form@vateko sorry for late reply. I can’t seem to be able to see anything at all that would help with diagnosis. Could you share a screenshot or maybe provide me login details.
Thanks
Forum: Plugins
In reply to: [Simple Address Autocomplete] Fatal error: Uncaught TypeError: array_search()@besky thank you. I will look into it and try and replicate it. I will get back to you ASAP.
Forum: Plugins
In reply to: [Simple Address Autocomplete] Simple Address Autocomplete Error@toolssh4na I have not heard back from you in a week. I will close this support ticket for now. If the issue persist please leave another message.