Developer forum

Forum » Swift » Google Places autocomplete - possible to add "AU"? Or allow flexible address format?

Google Places autocomplete - possible to add "AU"? Or allow flexible address format?

Jon Thorne
Jon Thorne
Reply

in _places.js there is some address formatting hard-coded for a few special countries. Is it possible to get "AU" added to this list? Or make it customisable?

const addressField = document.querySelector(
          "#" + fieldPrefix + "Address"
        );
        if (addressField != null) {
          if (
            countrycode != "US" &&
            countrycode != "GB" &&
            countrycode != "CA"
          ) {
            addressField.value = address + " " + streetnumber;
          } else {
            addressField.value = streetnumber + " " + address;
          }
        }

 

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Jon

Sure - I have added it a pull.

Votes for this answer: 1

 

You must be logged in to post in the forum