{ "version": 1, "title": "Tutorial — Calculated and Hidden Fields", "fields": [ { "id": "intro", "type": "note", "label": "Calculated fields are computed automatically from other field values using arithmetic expressions. Hidden fields store a fixed value (like a survey round or version number) that is included in every submission without being shown to the field worker." }, { "id": "divider_1", "type": "divider" }, { "id": "calculated_note", "type": "note", "label": "Calculated fields: the expression uses field IDs and arithmetic operators (+, -, *, /). The result is included in the submission automatically. The field worker never sees it." }, { "id": "adults_male", "type": "number", "label": "Adult males (18+)" }, { "id": "adults_female", "type": "number", "label": "Adult females (18+)" }, { "id": "children_count", "type": "number", "label": "Children (under 18)" }, { "id": "total_members", "type": "calculated", "label": "Total household members (auto)", "expression": "adults_male + adults_female + children_count" }, { "id": "divider_2", "type": "divider" }, { "id": "income_note", "type": "note", "label": "Another example: calculate a per-capita income from two inputs." }, { "id": "monthly_income", "type": "number", "label": "Monthly household income (USD)" }, { "id": "income_per_capita", "type": "calculated", "label": "Monthly income per capita (auto)", "expression": "monthly_income / total_members" }, { "id": "divider_3", "type": "divider" }, { "id": "hidden_note", "type": "note", "label": "Hidden fields: always included in the submission with a fixed value. Useful for tagging submissions with a survey round, form version, or project code. The field worker never sees or fills it." }, { "id": "survey_round", "type": "hidden", "label": "Survey Round", "default": "2026-Q1" }, { "id": "form_version", "type": "hidden", "label": "Form Version", "default": "1.0" }, { "id": "project_code", "type": "hidden", "label": "Project Code", "default": "PROJ-001" }, { "id": "divider_4", "type": "divider" }, { "id": "location", "type": "geopoint", "label": "Location", "required": true }, { "id": "notes", "type": "textarea", "label": "Notes" } ] }