Webform Auto Address
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
Autocompleting addresses is one of the small steps to create a better web experience. The API of postcode.nl offers autocompletion functionality for addresses located in The Netherlands. This module integrates this service into Webform by creating a component that automatically fills in the street name and city when the user provides his/her postal code and house number. The service that responds the address information is offered free of charge to webshops by postcode.nl.
The module's functionality is designed to assists users/visitors. Therefore, no validation is applied, allowing the user/visitor to enter a non-existing address (i.e., addresses postcode.nl isn't aware of). This also means that when no (valid) key and secret are available for the postcode.nl API, this module is still functional!
Results of lookups using the postcode.nl API are cached for 15 minutes to prevent making unnecessary requests (even lookups that didn't respond a correct lookup result).
Features
Main reasons to use this module:
- Extends Webform with an address (autocompletion) component.
- Maintain a high web experience, the module only offers functionality that assists the visitor.
- Can be used to enter address of each country.
- Able to autocomplete addresses located in The Netherlands, by using the postcode.nl API service.
- Implements time-based caching to limit (i.e., prevent high) server resource usage.
Requirements
Due to the dependency to Webform, PHP 5.3 is required.
Usage
Using this module should be straightforward, to install the module follow the steps below:
- Downloading and enabling is like any other module. If you are unfamiliar, a complete description on installing modules can be found here.
- On each 'webform node' component(s) can be added of the type 'Address (autocomplete)'. More information on how to use Webform can be found here.
- In order for the autocompletion to work, you need to obtain a valid key and secret by creating an account at https://api.postcode.nl/. Insert the key and secret on the component's edit page.
- Visit the 'webform node' to see the Webform Auto Address component in action.
Similar projects
We have found the following modules that offer similar functionality:
- Address Field NL Postcode, offering autocomplete functionality by extending the Address Field module and using the (same) webservice provided bij postcode.nl. However, the module cannot be used in a Webform.
- Addressfield Autocomplete, offering autocomplete functionality by extending the Address Field module and using Google Maps autocomplete API. Similar to Address Field NL Postcode, this functionality is not available in a Webform.
- Addressfield Tokens, extends the Address Field module and provides an integration with Webform. However, no autocomplete functionality is available.
