Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Statistics Counter Module statistics_counter crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

This module provides a field type for storing currency information based on the ISO 4217 standard. It allows editors to select currencies from a predefined list, ensuring accuracy and consistency, and includes support for withdrawn currencies.

A field type for currencies, following ISO 4217. Add it to any entity and editors pick a currency from a list of every code in the standard, rather than typing one into a plain text field and hoping.

The module is small and feature-complete. It does one thing, has no dependencies beyond Drupal core, and is maintained for fixes rather than new features.

Features

  • A currency_field field type, with a select widget and a formatter, available on any fieldable entity.
  • The complete ISO 4217 list bundled as data — alphabetic code, numeric code, currency name, issuing entity, and minor unit — so there is no API call and no external service to depend on.
  • Withdrawn currencies carry their withdrawal date, so historical records stay valid instead of failing validation.
  • Options can be keyed and labelled by any pair of those columns, so a field can store alphabetic codes while showing full currency names, or store numeric codes for a system that expects them.

Requirements

Drupal 8, 9, 10 or 11. Nothing else.

Installation

composer require drupal/currency_field, then enable the module. See Installing modules for the longer version.

Usage

Add a field of type Currency to any entity bundle through Manage fields. Choose the select widget on Manage form display, and set the label format on Manage display.

For developers

Two helpers are available if you need the currency data outside a field:

  • currency_field_currencies() returns the full decoded list.
  • currency_field_currency_options() returns an options array, keyed and labelled by whichever columns you ask for — AlphabeticCode, NumericCode, Currency, Entity, MinorUnit or WithdrawalDate.

The source data comes from the currency-codes dataset and lives in currencies.yml. Issues and merge requests for data corrections are welcome.

Used by

GTFS Utilities uses it in its GTFS Fares submodule to store fare product prices. It is not specific to that use — it is a general-purpose field.

Maintainers

Maintained by tbcs, supported by FivePaths.

Activity

Tracked releases
1
Tracked since
Aug 2026
Latest release
5 days ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
2.0.0 Stable Aug 18, 2026