field typescalculated

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

PropertyTypeDefaultDescription
idstringUnique field identifier (UUID in the builder).
typestringcalculatedMust be "calculated".
labelstringHuman-readable label shown above the field or step heading.
instructionstringundefinedOptional help text below the label.
formulastring""Expression with {field_id} tokens, e.g. "{qty}*{price}".
conditionalRulesarrayundefinedShow this field when any rule matches another field's value.
logicobjectundefinedSimple visibility: depends_on + show_if_value.

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
}

Common Use Cases

  • Order totals: quantity × unit price with tax or shipping rolled in
  • Quote builders surfacing subtotals before respondents submit
  • BMI-style health calculators from height and weight inputs
  • Concatenating first and last names for a read-only display label
  • Previewing derived values during data entry while server logic still re-verifies totals