FormElement Types & Capabilities
Data Collection Elements:- NUMBER: Numeric inputs with unit integration, decimal precision, min/max validation
- SHORT_TEXT: Single-line text with character limits and format validation
- LONG_TEXT: Multi-line text areas for descriptions and comments
- SINGLE_CHOICE: Radio buttons with custom option values and labels
- MULTIPLE_CHOICE: Checkboxes allowing multiple selections
- FILE_UPLOAD: Document attachments with type restrictions and size limits
- TITLE: Section headers with custom styling and hierarchy
- PARAGRAPH: Rich text content for instructions and descriptions
- DIVIDER: Visual separators for form organization
- GROUP: Collapsible sections for organizing related fields
- PAGE: Multi-page forms with navigation controls
- IMAGE: Embedded images for visual guidance
- ACTIVITY: Custom calculations based on activity definitions (cannot use TIMESTAMP period)
Data and periods
Values for each element are stored as FormElementSubmission rows within a FormSubmission. Period handling:- YEARLY:
periodUnit = 1 - MONTHLY:
periodUnit = 1..12 - QUARTERLY:
periodUnit = 1..4 - TIMESTAMP: requires a
recordedAtUTC timestamp;periodUnitis derived from the recorded month
value supports multiple data types
- Numbers:
1250.5 - Text:
"Natural gas from certified supplier" - Arrays:
["Grid electricity", "Solar panels"] - Objects:
{"scope1": 450, "scope2": 280, "total": 730}
Configuration Options
Units: Associate units with elements for clear labeling and validation. Validation Rules: Ensure data quality and consistency- Required field enforcement
- Min/max value validation
- Format validation for text fields
- File type and size restrictions for uploads
- Show/hide elements based on responses
- Change validation rules conditionally
- Update available options dynamically
total or snapshot.
Workflow status
Each saved value has a status (COMPLETED, APPROVED, REJECTED) based on the form/organization workflow. Approvals apply per value; for ACTIVITY elements, bulk status updates affect all rows of the same element and period within a submission.Real-World Examples
Energy Consumption Field:- Type: NUMBER
- Unit: kWh
- Validation: Min 0, Max 1,000,000
- Period: Monthly
- Required: Yes
- Type: SINGLE_CHOICE
- Options: [“Grid Electricity”, “Solar”, “Wind”, “Natural Gas”]
- Conditional: Shows renewable details if solar/wind selected
- Type: FILE_UPLOAD
- Accepted: PDF, Excel, CSV
- Max size: 10MB
- Required: No
- Metadata: Set
allowSupportingDocumentsUpload: truewhen you want this element to expose the supporting-document drawer in public forms configured withpublicSupportingDocumentsMode = "opt-in". The builder exposes this as the Allow supporting documents (public) checkbox.
Inline choice children
When you want a follow-up element to appear directly beneath the option that triggers it:- Add a
showcondition with a singleequalscomparison targeting oneSINGLE_CHOICE/MULTIPLE_CHOICEparent option (aggregator must staySINGLE). - Toggle Inline under choice option in the element settings (the toggle remains disabled until the condition qualifies).
- The renderer will inject the child beneath the selected option for every period (including TIMESTAMP rows). Legacy layouts remain unchanged for elements that do not enable
config.inlineChoiceDisplay.
- Type: ACTIVITY
- Inputs: Fuel consumption, emission factor
- Output: Total CO2e emissions
- Auto-calculation: Yes

