Address

Categories

Component ID

2421989

Component name

Address

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

299524

Component created

Component changed

Component body

Provides functionality for storing, validating and displaying international postal addresses.

The Drupal 8 heir to the addressfield module, powered by the commerceguys/addressing library.

Features:

  • Address field type and form element
  • Country field type and form element
  • Zone field type and form element
  • Address formats for 200 countries
  • Subdivisions (administrative areas, localities, dependent localities) for 40 countries
  • Subdivision translations for all of the parent country's (i.e Canada, Switzerland) official languages.
  • Country list with translations for over 200 locales, provided by CLDR

Zones are territorial groupings often used for shipping or tax purposes. They can match countries, subdivisions (states/provinces/municipalities), postal codes. For example: "California and Nevada", "France and Monaco", "Germany and a set of Austrian postal codes".

Address data model

Each address can have the following properties:

  • Given name (First name)
  • Additional name (Middle name / Patronymic)
  • Family name (Last name)
  • Organization
  • Address line 1
  • Address line 2
  • Postal code
  • Sorting code
  • Dependent Locality (Neighborhood / Suburb)
  • Locality (City)
  • Administrative area (State / Province)
  • Country

Property names follow the OASIS eXtensible Address Language (xAL) standard.

Installation

Since the module requires external libraries, Composer or Ludwig must be used.

Composer

If your site is managed via Composer, use Composer to download the module, which will also download the required libraries:

composer require "drupal/address ~1.0"

~1.0 downloads the latest release, use 1.x-dev to get the -dev release instead.
Use composer update drupal/address --with-dependencies to update to a new release.

Ludwig

Otherwise, download and install Ludwig which will allow you to download the libraries separately:

  1. Download Address into your modules folder.
  2. Use one of Ludwig's methods to download libraries:

    a) Run the ludwig:download Drupal Console command or the ludwig-download Drush command.

    b) Go to /admin/reports/packages and download each library manually, then place them under address/lib as specified.

  3. Enable Address.

Note that when using Ludwig, updating the module will require re-downloading the libraries. Composer is recommended whenever possible.