How can I preserve terminal forms?

I need a stable way to keep simple form workflows in a terminal reader.

Accepted answer

Map form fields into a semantic model and keep submission explicit.

let submit = form.submit(None, fields)?;
  1. Model fields.
  2. Validate required values.
  3. Emit deterministic diagnostics.
Related thread Policy discussion