Money fields give you a text input tailored for storing currency amounts.
Money fields have the following settings:
- Currency – The currency in which values should be stored.
- Default Value – The default value that should be applied for new elements.
- Min Value – The lowest amount that may be entered in the field.
- Max Value – The highest amount that may be entered in the field.
- Show Currency – Whether to display the currency label with the field’s text input.
- Size – The field’s input width in characters. (Default omits size (opens new window) attribute.)
# Working with Money Field Data
If you have an element with a Money field in your template, you can output its value using the money filter, or craft\helpers\MoneyHelper::toString() (opens new window).
That will give you a formatted currency value for the field, if it has a value.