Appearance
Form Formulas
A form formula calculates a Value action from answers in the current form. It uses the same restricted Liquid engine in the form preview, live form, and server-side form evaluation.
Read Form Logic for rule order, conditions, visibility, editability, and required-field actions.
Set up a calculated field
- Add the source fields and the destination field to your form.
- Open the logic editor and create an Always Runs rule, or a Conditional rule if the value applies only for certain answers.
- Add a Value action and choose the destination field.
- Set the source to Formula.
- Use field mentions to insert the source values, then add any supported filters.
- Check the live preview using ordinary, empty, and invalid inputs.
If people should not replace a calculated value, add an Editability action that makes the destination read only. An editable destination can preserve a person's manual replacement while source answers continue changing; an Always Runs rule alone is not a read-only policy.
Field references
Each output expression must begin with a reference in this form:
liquid
{{ fields.first_name.value }}The middle part can be the saved field ID or the alias derived from its label. Nawfe forms an alias by trimming the label, making it lowercase, replacing runs of characters other than ASCII letters and digits with underscores, and removing leading/trailing underscores.
| Label | Alias |
|---|---|
| First Name | first_name |
| Unit Price | unit_price |
| Customer Email Address | customer_email_address |
For example, a field with ID field_1 and label First Name can be referenced as either fields.field_1.value or fields.first_name.value. Prefer the editor's ID-based mention when labels may change or multiple fields have the same label. Aliases are conveniences, not unique field identifiers; changing a label can break an alias reference.
Literal text belongs outside the output expressions. Constants are also allowed as filter arguments:
liquid
Reference: {{ fields.reference.value | default: "Pending" }}
{{ fields.quantity.value | times: 12 }}The first formula is suitable for a text destination. The second can target a number.
Supported boundaries
- Read current form fields through
fields.<field>.value. - Combine several field expressions with literal text.
- Use only the approved formula filters.
- Use another current form field as a filter argument, such as
times: fields.unit_price.value. - Use a Static Value action for a fixed value that does not need calculation.
For an upstream workflow value, use a Value action's Variable source where offered. To transform upstream data in a formula, first make it available as a field in the current form.
The form validator requires the exact dotted field-value shape at the start of each output expression: fields.<field>.value. Use the field selector to insert a valid reference.
Use Conditional rules to choose when a formula applies. For example, use one rule for a standard rate and another for a discounted rate, rather than putting an if tag inside a formula.
Examples
These examples assume fields with the listed labels. Insert your actual fields with the editor's mention picker.
Full name
Source fields: First Name and Last Name. Destination: Text Input.
liquid
{{ fields.first_name.value | strip }} {{ fields.last_name.value | strip }}For Ada and Lovelace, the result is Ada Lovelace. The space between expressions is literal, so a missing name leaves that separator in the result.
Normalized email
Source: Email. Destination: Text Input configured for email.
liquid
{{ fields.email.value | strip | downcase }}For [email protected] , the result is [email protected]. Normalizing text does not prove that an email address exists or belongs to someone; the destination field still applies its own validation.
Quantity times unit price
Sources: Quantity and Unit Price, both numbers. Destination: Number Input.
liquid
{{ fields.quantity.value | default: 0 | times: fields.unit_price.value | round: 2 }}For 3 and 12.5, the result is 37.5. Keep the result numeric: do not add $, thousands separators, or explanatory text to a Number Input formula.
Apply a percentage
Sources: Subtotal and Tax Rate, where the rate is entered as a percentage such as 8. Destination: Number Input for tax amount.
liquid
{{ fields.subtotal.value | default: 0 | times: fields.tax_rate.value | divided_by: 100 | round: 2 }}For subtotal 250 and tax rate 8, the result is 20.
To calculate the total including tax, use a second destination and reference the calculated Tax Amount field:
liquid
{{ fields.subtotal.value | default: 0 | plus: fields.tax_amount.value | round: 2 }}Place the Tax Amount action before the final total action. Rules and actions are evaluated in order; do not create circular calculations.
Enforce numeric bounds
Source: Discount. Destination: Number Input.
liquid
{{ fields.discount.value | default: 0 | at_least: 0 | at_most: 100 }}Negative inputs produce 0; inputs above 100 produce 100. Set the source field's validation limits as well if out-of-range answers should be rejected rather than normalized.
Fill missing text
Source: Reference. Destination: Text Input.
liquid
{{ fields.reference.value | strip | default: "Pending" | upcase }}An empty or whitespace-only answer produces PENDING.
Join a multi-select answer
Source: Departments, a multi-select field. Destination: Text Input.
liquid
{{ fields.departments.value | join: ", " }}For stored selections ["ops", "sales"], the result is ops, sales. This uses stored option values, which can differ from the labels people see.
Copy a date
Source: Requested Date. Destination: a Date / Time field using a compatible mode.
liquid
{{ fields.requested_date.value }}The destination must accept the source date/time value. Use date_fmt later in a workflow template when you need a display date in an email.
Result types and validation
Liquid renders text first. Nawfe then converts the result to the destination field's type and validates it.
| Destination | Formula guidance |
|---|---|
| Text or rich text | Return the intended text; HTML filters do not change a plain text field into rich text |
| Number Input | Return a numeric value without labels, separators, or currency symbols |
| Checkbox | Return a compatible boolean value, such as a referenced checkbox value |
| Date / Time | Return a value accepted by the field's configured date/time mode |
| Select or Radio Select | Return a value compatible with the configured options and selection mode |
For Team / User Selector values, choose entities directly or use a compatible workflow variable.
An incompatible result produces a field error. For example, text such as not a number cannot populate a Number Input. Errors must be resolved before a valid submission can be accepted.
The builder checks syntax, unsupported filters, and references against the current form. Deleting a source field or renaming an alias can leave a broken reference. Repair it in the formula editor using the current field picker.
Troubleshooting
| Symptom | Check |
|---|---|
| Formula is rejected as a reference | Start each {{ ... }} with fields.<current-field>.value; use its saved ID or current alias |
| Undefined filter | Check the spelling and formula filter list; workflow-only filters are rejected |
| Tag not found | Remove {% ... %} and use form rule conditions or another calculated field |
| Empty output | Check the source answer and use default if an empty value needs a fallback |
| Destination expects a number/date/boolean | Return the appropriate value without display formatting or surrounding text |
| Calculated value stops following source edits | Check whether someone manually changed the editable destination; use a read-only destination for controlled calculations |
| Formula changed after a label edit | Reinsert an ID-based field mention instead of relying on the old label alias |
Keep formulas small. The formula engine limits template size and execution time so live form updates stay responsive. Use workflow nodes for processing that needs workflow data, iteration, or side effects.