Modes
Joyfill forms can operate in two modes that control whether users can edit fields.
Available Modes
enum class Mode {
fill, readonly
}Setting the Mode
Set the mode when creating your Form:
Form(
editor = rememberDocumentEditor(json),
mode = Mode.readonly // default is Mode.fill
)Mode Comparison
| Feature | Mode.fill (Default) | Mode.readonly |
|---|---|---|
| Description | Users can interact with and edit all form fields | Users can view the form but cannot make any changes |
| Field editing | Enabled | Disabled |
| Events | Fire normally (onFieldChange, onFocus, onBlur, etc.) | Don't fire |
| Upload/capture actions | Enabled | Disabled |
| Field values | Can be changed | Visible but locked |
Updated 13 days ago
What’s Next