showForm
Canonical ID: ui.form.
Shows a form and waits for submit or cancel. Included in Core/Learner.
Signature
showForm(definition)
The definition is a Map with title, fields, and optional submit and cancel. Field types: text, number, checkbox, choice, label. Data fields need unique IDs; initial values and validation rules must match their types. Map keys and type names are not translated.
Submitting returns {"submitted": true, "values": {...}}; cancelling returns {"submitted": false, "values": {}}. Always check submitted before reading values. Invalid definitions or replies produce a runtime diagnostic. Stopping cancels pending input.