Insert calculated field
editor_insertCalculatedFieldInsert a calculated field for scoring, counters, and computed runtime values. Hidden from respondents. Use with calculateValue action in logic rules to accumulate or compute values. Example: Create a "Total Score" field and add points via logic rules. For URL-seeded metadata, use editor_insertHiddenField instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the calculated field (e.g., "Total Score", "cart_total") | |
| after | No | NodeId to insert after. Use $prev to chain. Omitting appends to end (usually wrong). | |
| formId | Yes | Form ID to insert into | |
| parentId | No | Parent node ID to insert into (e.g., column1) | |
| position | No | Position among siblings: inside parentId when given, else at the top level ('first' = top of the form, e.g. a title). Not combinable with after. | |
| fieldType | No | Type of the calculated value | number |
| initialValue | No | Initial value (default based on fieldType) |