Modifier :numeric
Plain number. Example: {Seats:115:numeric} gives 12345.5. On the test form, this field is {Seats:115} (Number).
About
Removes the currency symbol and thousands separators. Use it alone; with other modifiers, it is ignored.
| Product | Gravity Forms |
|---|---|
| Requires | Gravity Forms 1.9 or later |
| In the picker | What to show, for Number, Product price, Quantity, Shipping (single), and Total fields |
| Combining | Use it alone. With other modifiers, it is ignored. |
How to use it
Pass an amount to a script
A script or a payment link needs 1234.56, not $1,234.56.
Write
<span data-amount="{Amount:8:numeric}">{Amount:8}</span>Get
<span data-amount="1234.56">$1,234.56</span>Examples
Output from the real plugin code, run on a test entry.
| Merge tag | Output | Without the modifier |
|---|---|---|
{Amount:8:numeric} | 1234.56 | $1,234.56 |
Works on
Form fields: Number · Product price · Quantity · Shipping (single) · Total.
Left out
| Field kinds | Why |
|---|---|
| Calculation · Product (single) · Product (hidden) | Outputs nothing on the whole field. Gravity Forms has no single value for this field as a whole, so the tag outputs nothing and so does any modifier. Use one part instead, like .3 for a first name. |