Drupal is a registered trademark of Dries Buytaert

Overview

The Address Country Unknown module is extending the functionality of the Address module. It provides custom widgets and formatters that allow users to enter, save, and display an address even when the country is (semantically) unknown = left empty (technically).

This is a(n ugly) workaround - take care!

The module implements a workaround that solves the issue of not being able to enter an address without country (because country may not be known in real-world scenarios and the address doesn't need to be complete in these cases, as it's just information text), but because the Address module does not support this (for some good reasons), the implementation is kind of ugly.

NEVER use this in combination with Drupal Commerce which heavily relies on complete addresses!

Do not use in production without reading the code and documentation carefully. (Only for developers who know what they're doing ;))

So probably this module will never have a stable release.

Why We Implemented It

By default, the Drupal Address module strictly requires a country to be selected. The chosen country dictates which address fields (like state, zip code, or province) are displayed and validated, based on that specific country's official address format.

However, there are real-world scenarios where an address needs to be recorded, but the country is either unknown, incomplete, or not applicable. In the default setup, leaving the country blank completely clears and hides the rest of the address fields. See #3522596: Allow country to be empty if unknown

We implemented this module to solve that exact problem. It overrides the default restrictive behavior by allowing to select no country for an address, still showing the address fields and providing a generic address format when no country is selected. This ensures that users can still input and display essential address information without needing to provide a country.
Furthermore, migrated data which is missing country codes but holds other address data won't get cleared automatically.

If a country is selected, the module uses the default Address implementation and logics.

Usage

To use this functionality, simply select the "Address (with empty / unknown country)" widget and formatter(s) on your address fields in your entity's form and display settings.

IMPORTANT: The formatters and widgets are required to be used together! Don't mix them with the default Address widgets / formatters, or you'll see errors or unexpected behaviour!

Also note that if this module is enabled, all address fields in the project are replaced by the custom implementation. See the module file for details.

Alternatives

Activity

Total releases
2
First release
Mar 2026
Latest release
2 days ago
Release cadence
0 days
Stability
0% stable

Releases

Version Type Release date
0.0.1-alpha1 Pre-release Mar 12, 2026
0.x-dev Dev Mar 12, 2026