Calculated Field
A read-only field whose value is derived from a formula using other field values.
Overview
The Calculated Field automatically computes a value from a formula expression you define. The formula can reference other field values using their name property and supports standard arithmetic operators, comparison operators, and a set of built-in functions.
The field updates in real time as the referenced fields change. It is displayed as a read-only input. The computed value is included in the submission data like any other field.
Note: Calculated fields are evaluated client-side in the browser. Do not rely on them for server-side business logic or security-critical computations.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| type | string | — | The field type identifier (e.g. "text", "email"). |
| label | string | — | Human-readable label shown above the field. |
| name | string | — | Unique machine name used as the data key in submissions. |
| required | boolean | false | When true the form cannot be submitted without a value. |
| placeholder | string | undefined | Ghost text shown inside the input when empty. |
| defaultValue | any | undefined | Pre-filled value when the form loads. |
| hidden | boolean | false | Hides the field from the rendered form (still submitted). |
| disabled | boolean | false | Renders the field as read-only and non-interactive. |
| description | string | undefined | Helper text displayed below the field label. |
| className | string | undefined | Additional CSS class applied to the field wrapper. |
| formula | string | — | The expression to evaluate (e.g. "{quantity} * {unit_price}"). |
| format | "number" | "currency" | "text" | "number" | How to format the computed result for display. |
| currency | string | "USD" | Currency code when format is "currency". |
| decimalPlaces | number | 2 | Number of decimal places to round to. |
Formula Syntax
Reference any other field by wrapping its name in curly braces: {field_name}. Standard math operators apply: + - * / ( ).
// Total price
{quantity} * {unit_price}
// Tax-inclusive price
{subtotal} * 1.13
// Conditional logic
IF({quantity} > 10, {unit_price} * 0.9, {unit_price})
// String concatenation
CONCAT({first_name}, " ", {last_name})JSON Schema
{
"type": "calculated",
"label": "Total Amount",
"name": "total_amount",
"formula": "{quantity} * {unit_price} * (1 + {tax_rate} / 100)",
"format": "currency",
"currency": "USD",
"decimalPlaces": 2
}