ISO 4217 currencies as a Drupal field¶
A field type that stores a currency's three-letter code, a select widget that lists the current ISO 4217 currencies, and a formatter that shows the code, the currency name or the country.
For Drupal 10.3+, 11 and 12 ยท No dependencies outside core

What it does¶
Editors pick a currency from a list instead of typing a code. The field stores the alphabetic code, such as EUR, and rejects anything that is not an ISO 4217 code.
- Field type
currency_field: onevaluecolumn holding the alphabetic code. Values are validated against every code in the bundled list, current and withdrawn. - Widget
currency_widget: a select of current currencies, labelled by code, currency name or country, sorted by label, with an empty option. A withdrawn currency that an item already stores stays selectable. - Formatter
currency_formatter: shows the code (the default), the currency name or the country name, as plain text. - Data:
currencies.yml, generated from the ISO 4217 lists published by SIX, the maintenance agency. No API calls or external services.
It suits any site that records prices, invoices, fares or accounts in more than one currency. GTFS Core uses it for fare product prices.

Documentation¶
- Installation: requirements and Composer.
- Configuration: field storage, widget and formatter settings.
- Usage: editing, validation, and setting values in code.
- Extending: helper functions, plugin IDs and the validation constraint.
- Currency data: where the list comes from and how to update it.
- Troubleshooting
- Changelog and upgrading