fun Form(editor: DocumentEditor, mode: Mode = Mode.fill, maxAllowedSizeMB: Int? = null, onUpload: suspend (ComponentEvent<AbstractFileEditor>) -> List<String>? = null, onCapture: suspend (ComponentEvent<AbstractCompStringEditor>) -> String?? = null, onBlur: (event: ComponentEvent<*>) -> Unit? = null, onFocus: (event: ComponentEvent<*>) -> Unit? = null, license: String? = Secrets.LICENSE, allowDuplicatingPages: Boolean = true, navigation: @Composable (navigator: PageCollection, state: PageCollectionState) -> Unit? = { navigator, state ->
if (state.pages.isNotEmpty()) {
JoyPageSelector(
state = state,
allowDuplicatingPages = allowDuplicatingPages && mode != Mode.readonly,
onChange = { navigator.navigate(it) },
onDuplicate = { navigator.duplicate(it, it.name) }
)
}
}, error: @Composable (Error) -> Unit = { ErrorFormState(it) }, onFieldChange: (event: ComponentEvent<*>) -> Unit? = null, showUnsupportedFields: Boolean = false, showUnsupportedColumns: Boolean = true, showRowNumbers: Boolean = true, modifier: Modifier = Modifier, arrangement: Arrangement.Vertical = Arrangement.spacedBy(16.dp), contentPadding: PaddingValues = PaddingValues(0.dp)) High-level composable to render a document using a DocumentEditor. Orchestrates page navigation, component rendering and event emission.
Parameters
Editor providing pages, fields and validation.
Rendering mode (e.g., fill vs readonly) controlling interactivity.
Optional file upload size limit (MB) for file components.
Async handler to upload files; used by file/image components.
Async handler to capture barcode/signature content.
Callback when a component loses focus.
Callback when a component gains focus.
License string used to enable licensed features.
Whether user can duplicate pages via navigation UI.
Slot for a custom page navigator; provided default shows page tabs.
Error UI when editor.error is non-null.
Callback invoked on component value changes.
If true, render a placeholder for unsupported editors.
If true, render placeholder for unsupported table columns.
If true, display row numbers in table components.
Layout modifier for the content area.
Vertical spacing arrangement between rows.
Padding applied to the list of components.