Yirklum Posted October 19, 2022 Share Posted October 19, 2022 Is there a way to create a Squarespace form with a location field that autocompletes as a person types in their address? My client wants this feature so people will enter more accurate addresses. I know how to do this when I'm building a form from scratch, but I can't figure out if this can be done with a Squarespace form. I would greatly appreciate any advice! Link to comment
creedon Posted October 19, 2022 Share Posted October 19, 2022 It may be possible. Its depends on the form. In general you will need to attach a handler to the field of interest to handle the auto-complete. Please post the URL for a page on your site where we can see your issue. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works. Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support! Link to comment
Yirklum Posted October 20, 2022 Author Share Posted October 20, 2022 This is a link to the live site, specifically the page where the form is: https://www.wallflowerrentals.com/contact Thanks for you help! Link to comment
creedon Posted October 20, 2022 Share Posted October 20, 2022 (edited) This is not a solution but a shell of a script that can get you started. <script> /* begin title of effect here Version : 0.1.0 SS Versions : 7.1, 7.0 By : Thomas Creedon < http://www.tomsWeb.consulting/ > no user serviceable parts below */ document.addEventListener ( 'DOMContentLoaded', ( ) => { const selector = '#textarea-yui_3_17_2_1_1520795615602_101969-field'; const element = document.querySelector ( selector ); element.addEventListener ( 'input', event => { console.log ( 'event : ', event ); console.log ( 'event.target : ', event.target ); } ); } ); /* end title of effect here */ </script> This shows how you can wait for the page to be mostly loaded. Then add an event listener to an input element. Let us know how it goes. Edited October 20, 2022 by creedon tuanphan 1 Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment