Form object
Every schema starts with a form object. It defines metadata, special fields, and events.
Attributes
Application-level attributes
Attributes marked with ✓ in the App-level column are application-level metadata not processed directly by the engine. They can be used when integrating with reform SaaS product or when building similar functionality in your own application.
| Attribute | Type | Required | App‑level | Notes |
|---|---|---|---|---|
name | string | ✓ | Human-friendly form name. | |
description | string | Form description. | ||
id | string | ✓ | Unique form identifier. | |
record_count | number | ✓ | Platform-owned operational counter. Number of records in the form. | |
record_last_change_at | string | ✓ | Platform-owned operational counter. Last record change date/time (ISO 8601). | |
form_created_at | string | ✓ | Form creation date/time (ISO 8601). | |
form_updated_at | string | ✓ | Form last update date/time (ISO 8601). | |
form_created_by | string | ✓ | User who created the form. | |
form_updated_by | string | ✓ | User who last updated the form. | |
status | string | ✓ | Form status, usually active or inactive. | |
version | string | ✓ | Optional platform-owned schema version. form0-core does not increment it. | |
main_org_id | string | ✓ | Main organization ID. | |
main_org_metadata | object | ✓ | Main organization metadata fields. | |
sub_org_id | string | ✓ | Sub-organization ID. | |
sub_org_metadata | object | ✓ | Sub-organization metadata fields. | |
project_id | string | ✓ | Project ID. | |
project_metadata | object | ✓ | Project metadata fields. | |
ai | object | AI metadata for form-level guidance (see AI metadata). | ||
status_field | object | ✓ | Special status field definition (see Meta fields). | |
title_field | object | ✓ | Special title field definition (see Meta fields). | |
bounding_box | array | ✓ | [min_lat, min_lng, max_lat, max_lng] containing all records. | |
location_enabled | boolean | ✓ | Enables location capture. | |
location_required | boolean | ✓ | Requires location data when enabled. | |
image | string | ✓ | URL for the form icon (original). | |
image_thumbnail | string | ✓ | URL for thumbnail icon (160x160 px). | |
image_small | string | ✓ | URL for small icon (320x320 px). | |
image_large | string | ✓ | URL for large icon (640x640 px). | |
events | object | Event code block (events.code). | ||
form_links | object | Links to/from other forms (used with FormLinkField, see Meta fields). | ||
elements | array | ✓ | Form fields and containers (see Elements). |
For detailed information on each attribute including defaults and choices, see Form attributes.
Special fields
status_field and title_field are defined at the top level, not in elements. They are
validated like standard field types but have fixed behaviors. See Meta fields for details.
Events
events.code contains builtin and JavaScript expressions that register event handlers using builtins such as
ON, OFF, ALERT, SETVALUE, etc. See Events for details.
Example
Code