Modifier: :numeric
Strip formatting to a bare number. Write it after a colon: {Price:5:numeric}
About
Removes currency and thousands separators. Compared against the whole modifier string, so it cannot be combined with another modifier.
| Product | Gravity Forms |
|---|---|
| Requires | Gravity Forms 1.9 or later |
| Works on | Number, Option, Quantity, Product, Total, Shipping, Calculation, Product price, Product (hidden), Product (single), Shipping (single) fields |
| In the picker | What to show |
| Combining | Only works on its own: with any other modifier, it is ignored. |
How to use it
Pass an amount to a script
The number without the currency symbol and thousands separator.
Write
<span data-amount="{Amount:8:numeric}">{Amount:8}</span>Get
<span data-amount="1234.56">$1,234.56</span>Examples
Rendered by real Gravity Forms and GravityKit PHP against a test entry.
| Merge tag | Output | Without the modifier |
|---|---|---|
{Amount:8:numeric} | 1234.56 | $1,234.56 |
Where the merge tag picker offers it
Form fields: Number · Calculation · Product · Product (single) · Product (hidden) · Product price · Quantity · Option · Shipping · Shipping (single) · Total.