DocumentEditor and rendering a Form for customizing form behavior, including page management, field interactions, and display options.
Initialization with FormConfig
The recommended way to configure aDocumentEditor (and the Form that renders it) is with a single FormConfig object. This groups every option — mode, event handlers, license, schema validation, page behavior, display, and formula functions — into one configuration surface.
String:
FormConfig
FormEvents
PageConfig
DisplayConfig
The per-parameter overloads on
rememberDocumentEditor(document, mode, events, ...) and Form(editor, mode, ...) are deprecated. They still work and forward their arguments into a FormConfig, but new code should use the config-based APIs above.Page Management
Page Navigation
The page navigation UI is provided via a composable slot onForm, not a boolean flag. The default slot renders a page selector; pass null to hide it entirely, or supply your own composable to fully customize navigation.
Behavior:
- The default navigation displays a page selector that allows users to switch between pages
- The page selector respects conditional logic — hidden pages are not shown in the list
- The default selector reads
config.pages.enableDuplicatesandconfig.pages.enableDeletes(combined withconfig.mode) to decide which page actions are exposed
Page Duplication
Control whether users can duplicate existing pages.
Behavior:
- Duplicated pages retain all field values from the source page, including conditional logic and formulas
- The new page is inserted immediately after the source page in the page order
- Duplication emits a
ComponentEvent.PageEvent.PageCreatethroughevents.onChange - Only takes effect in
Mode.fill
Page Deletion
Control whether users can delete pages from multi-page forms.
Behavior:
- Delete is only available when there is more than one page (you cannot delete the last remaining page)
- A confirmation dialog is shown to the user before deletion
- Page deletion is permanent and cannot be undone
- Deletion emits a
ComponentEvent.PageEvent.PageDeletethroughevents.onChange - Only takes effect in
Mode.fill
Initial Page
Open the form on a specific page rather than the first valid one.Field Interactions
Single Click Row Edit
Simplify the process for opening table and collection rows for editing.
Behavior:
- Default (
false): Users must follow multiple steps to open a row form - Enabled (
true): Users can open the row form for editing with a single tap, providing a faster and easier editing experience - Applies to both Table fields and Collection fields
- The edit behavior respects the form’s mode — in
Mode.readonly, rows cannot be edited regardless of this setting
Inline Fields
Render supported fields inline instead of using the default stacked layout.Unsupported Fields and Columns
Control whether the form renders placeholders for field or column types that aren’t supported by the current SDK version.Row Numbers
Toggle row-number indicators on table and collection rows.Schema Validation
Control whether the document schema is validated during initialization.
Behavior:
- If validation fails,
editor.errorwill contain a non-null error value - The
Formcomposable renders theerrorslot instead of the document content - Set to
falseto skip validation (useful for testing or when you’re certain the document is valid)
Programmatic Page Operations
You can also perform page operations programmatically using thePageCollection API exposed via editor.pages.