Output and records
Engine
form0-core exposes two primary outputs:
- Engine state (
values,errors,visible,required,read_only) - Structured records for persistence (
createStructuredRecord)
Engine state
After engine.eval(), call engine.getState() to access the latest state.
Structured record output
createStructuredRecord transforms engine state into a submission-friendly format:
form_valuesuses field keys by default- Repeatable sections become arrays of child records
- Sections are omitted (containers only)
Field key mode
You can switch to data_name keys by using fieldKeyMode:
Code
Repeatable sections
Repeatable sections create nested records. Use originalElements to preserve the correct nesting
structure when building records.
Last modified on