This new version of the widget aims to provide an enhanced user experience by adding new functionality, and changing the default configuration to match the most common use cases.
Search speed
The widget will return address suggestions at a faster pace. We have reduced the pause period between queries from 400 milliseconds to 200 milliseconds. The user experience feels a lot snappier.
Match highlighting
Matched address elements are now highlighted in the search results.
This feature can be disabled if not required.
address_params: {highlight: 0}
Behaviour when no addresses found
When the user enters an address that cannot be found, the widget will now display an warning message. This message contains a Learn More link to explain why some addresses cannot be found. It also offers the ability to submit new addresses which may be included within the Addressfinder database.
No addresses were found. This could be a new address we don’t know about yet, or you may need to check the spelling. Learn more
Locations hidden by default
The Addressfinder database contains both address and location data. We found that most websites want to use Addressfinder to select an address. As a result, the v3 widget defaults to returning address information only. Websites which need location data (streets, suburbs, cities, regions) should set the following option when initialising the widget:
show_locations: true
Byline
We have included the Powered by Addressfinder message in the footer of the Addressfinder results. Customers on a Paid plan can hide this message by using following initialisation option:
byline: false
Support for Australian addresses
We have introduced the ability of the widget to search either New Zealand or Australian addresses. When initialising the widget, you should supply an additional country_code
parameter to indicate which address set to use.
Google Chrome bugfix
Google Chrome has a bug that ignores the HTML autocomplete attribute, and instead displays address suggestions that sometimes conflict with the Addressfinder widget search results. The v3 widget includes a workaround for this problem.
Code changes
The above changes should be applied in the Addressfinder Widget constructor function. The getting started page gives an example of the basic changes that are required. The widget documentation shows how to configure the new functionality described above.