Where Data Forms Fit
Data Forms are one piece of a document processing pipeline. First, a Data Definition (taxonomy) declares the structure you want to extract — the hierarchy of data objects, their attributes, and their types. Next, an Assistant orchestrates extraction modules that read documents and populate that structure. Finally, a Data Form renders the populated data for human review. Each data form is associated with a data definition, so the form knows which taxons, attributes, and data objects it can bind to.Key Concepts
-
UINode Tree — A data form is a tree of
UINodeobjects, not a flat list of cards. Each node specifies acomponenttype, optionalprops,bindings,children, and more. -
Components — Components are registered by namespace and type (e.g.,
v2:panel,v2:attributeEditor). Layout components likepanel,tabs,row, andcolstructure the form. Data components likeattributeEditor,table, andgridbind to extracted values. - Data Binding — Components connect to extracted data through binding expressions. These expressions are evaluated against a data context that contains the document’s data objects and attributes, letting you reference specific taxon paths and attribute values.
- Scripting — A QuickJS WebAssembly sandbox provides a secure runtime for business logic, validation rules, and computed values. Scripts run isolated from the main application and can respond to form events.
-
Bridge API — The
kodexa.*namespace exposes platform capabilities to scripts, including data access, navigation, HTTP requests, and form state management. - Extraction Integration — The document viewer supports direct extract (verbatim text selection) and AI extraction (LLM-powered multi-field extraction), both of which feed data back into the form.
Your First Data Form
Here is a minimal data form that displays an invoice summary panel with a label and an attribute editor:version flag tells the platform which renderer to use. The nodes array contains the root-level UI nodes. The v2:panel component acts as a container with a title bar, and its children array holds a label (bound to the current data object’s name) and an attribute editor (bound to a specific taxon path).
The
version: "2" flag is required. When present (or when nodes is a non-empty array), the platform uses the schema renderer. Without it, the form falls back to the legacy V1 card-based renderer.What’s Next
The remaining guides cover each aspect of data forms in detail:- Form Structure & Schema — UINode anatomy, conditionals, iteration
- Data Binding & Context — context variables, expressions, scoped data
- Layout Components — panels, tabs, rows, columns
- Data Components — attribute editors, tables, grids
- Extracting Data — direct extract and AI extraction
- Events & Scripting — QuickJS runtime, event handlers
- Bridge API — platform data access, HTTP, service bridges
