Simon Posted July 15, 2020 Posted July 15, 2020 Site URL: https://www.addy.co.nz/address-validation-javascript-code-generator I know there's been some questions in the past about address auto complete form fields. I wanted to share a solution for anyone wanting address lookup and auto complete for New Zealand addresses. This solution is from https://www.addy.co.nz/address-validation-javascript-code-generator. It's simple to implement, just follow the guide on the Addy website. Note this is for regular form blocks, not checkout forms. I haven't tried it checkout forms, but I don't know it would work as there's no customisation with the commerce checkout form. The steps are simple: Sign up for a free Addy account and get the API key Create a form block in Squarespace, adding text fields for each address line (not the Address module, as it won't give you the ID tags you'll need). For example, create input fields for: Address, Suburb, Town, Post Code. Using Chrome browser, code inspect (for example), look up the ID of each address field tag, then copy the tag to the Addy address validation javascript code generator. Using a text editor or similar, insert your API key into that snippet (that Addy gave you when you signed up). Paste the generated JS snippet into Squarespace (Advanced > Code Injection) in the Footer. Add the <script type="text/javascript"> header and </script> footer to the code snippet. That's it. So easy. Hope that helps all you Kiwis out there on Squarespace.
Christel_NZ Posted May 22, 2022 Posted May 22, 2022 Thanks Simon for sharing! Hey community, I am after a similar solution that would work for checkout. NZ website visitors would expect the address field to autocomplete once they start typing in their street. That's how all local websites work. I've set up 'Default Country' for my checkout as New Zealand, however addresses are still worldwide, which makes it really hard to find a NZ address (see below screenshot). From my research online, there doesn't seem to be a solution at this stage. I believe that Squarespace doesn't support this functionality at checkout. My website is https://www.themoneyjourney.co.nz/ and the URL for my cart is https://secure.squarespace.com/checkout?cartToken=kIWy26eQbOKh0czHSY2LztyiJprWS_rrHuk9oJnx&websiteId=6068e85dda18085693dc81b6 Thanks a million! Christel
creedon Posted May 23, 2022 Posted May 23, 2022 2 hours ago, Christel_NZ said: I am after a similar solution that would work for checkout. The checkout page can not be modified with custom code. It is a SS security feature. Christel_NZ 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Christel_NZ Posted May 23, 2022 Posted May 23, 2022 1 hour ago, creedon said: The checkout page can not be modified with custom code. It is a SS security feature. Thanks for confirming @creedon! creedon 1
musbkc Posted March 8, 2023 Posted March 8, 2023 , Is there an address validator for the United States?
Voight Posted May 23, 2023 Posted May 23, 2023 Can anyone help with the Auto address thing in Squarespace? I am trying with the addy solution API key but I don't know what I am doing wrong. Can you please share CSS for that?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment