Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Experimental project
This is a sandbox project, which contains experimental code for developer use only.
A very simple module that will allow you to mask certain input fields which require a currency formatting.
It uses the Jquery-maskMoney plugin, created by Diego Plentz.
Usage
$form['price'] = [
'#type' => 'money_mask',
'#settings' => [],
'#currency_code' => NULL
]
For organising the #settings, look here for the defaults.
Instead of #settings, you could provide a currency code and if Drupal Commerce is enabled, it will load the currency and merge those defaults.
Supporting organizations:
Project information
- Module categories: E-commerce, Developer Tools, Integrations
- Created by lammensj on , updated