Decimal formatter#
The Decimal (number_decimal) formatter displays the field value as a formatted decimal number.
Settings#
| Setting | Label | Description | Default |
|---|---|---|---|
| thousand_separator | Thousand marker | A punctuation mark (like a comma, dot, or space) used in large numbers to group digits into sets of three | , |
| key_label | Display | The key or label value option to output when the field settings support allowed values |
label |
| prefix_suffix | Display prefix and suffix | An option to determine if prefix or suffix from field settings should display in the output | FALSE |
| decimal_separator | Decimal marker | A symbol that divides the integer and fractional parts of a decimal subfield value | . |
| scale | Scale | The number of decimal places to display for a decimal subfield value | 2 |
Note
The decimal_separator and scale settings are only applicable for decimal subfield values.
Style settings#
These additional style settings give you complete control over the HTML markup generated by each subfield. This is one of the most powerful features of the Custom Field module for theming.
By customizing the wrapper tags and classes, you can:
- Create clean, semantic HTML that matches your theme’s design system
- Target individual subfields precisely with CSS (using subfield name and type)
- Reduce CSS specificity issues and override battles
- Improve accessibility and SEO with proper semantic elements (
<section>,<article>,<h3>, etc.) - Easily integrate with CSS frameworks like Tailwind, Bootstrap, or custom component libraries
Default behavior (when left empty) produces a <div> wrapper with intelligent, predictable classes based on the subfield name and type — giving you excellent theming hooks right out of the box.
| Setting | Label | Description |
|---|---|---|
| field_wrapper_tag | Field wrapper tag | HTML element that wraps the entire field + label |
| field_wrapper_class | Field wrapper class | Optional additional classes (space separated) |
| field_tag | Field tag | HTML element that wraps only the field value |
| field_class | Field classes | Optional field value classes (space separated) |
| label_tag | Label tag | HTML element that wraps the label |
| label_class | Label classes | Optional label classes (space separated) |