Skip to content
Forms and safe submission | Omni Manual Book

Forms and safe submission

Field contracts, asynchronous validation, financial review, conflicts, offline behavior, and recoverable submission.

A form should collect the minimum information needed for a valid business transition. Separate saving a draft from submitting for approval and from posting or paying. Show tenant, document identity, currency, and period before editable transactional details. The policies here are integration requirements, not evidence that every existing form implements them.

Group fields by the user’s decision: identity, transaction details, allocation, and review. Keep mandatory prerequisites visible before users spend time filling dependent fields. Reuse known customer, employee, and document data instead of requiring manual re-entry. Show the origin of inherited values and whether they can safely be overridden.

BaseInput provides label, hint, info, error, required, and disabled around modelValue. Its label uses a generated input ID; error or hint text is connected through aria-describedby. When error is present, it replaces the displayed hint and sets aria-invalid. Keep essential units and constraints in the persistent label or adjacent copy if they must remain during errors. The component exposes focus(); use it for an error-summary link or deliberate first-invalid-field focus.

ElementDoDo not
LabelName the business value and necessary unitUse an example as the only label
HintExplain a non-obvious requirement before submissionHide a posting constraint in hover-only help
Required stateMark and explain required inputs consistentlyRely on a red asterisk with no shared explanation
ErrorState the problem and a possible correctionDisplay a raw backend validation object
Read-only valueExplain its source and why it cannot changeMake it look editable but silently ignore edits
Optional valueExplain why supplying it is usefulForce invented data merely to satisfy a form

BaseInput with type="number" emits a JavaScript number when conversion succeeds and an empty string when cleared. Do not treat this conversion as a decimal-money parser or an accounting precision guarantee. Use the domain’s decimal/minor-unit contract and validate precision, range, currency, and rounding rules. Do not silently round a material amount while keeping the original value visible. Distinguish an accounting date from an event timestamp and state the applicable timezone for deadlines. Reject impossible date combinations with actionable messages, such as a due date before the invoice date.

Use SearchableSelect for large authorized option sets rather than loading the entire master-data table. Its server fetch receives search and cursor parameters; optionLabel can resolve a selected value outside the loaded window. Preserve a known selected label while new search results load; do not display a raw UUID as the normal experience. Changing a parent value must invalidate incompatible dependent values with a visible explanation. Creation through create and createPermission must follow the same authorization and validation as the full create page. Do not enable free-form creatable values for controlled accounts, tax codes, or legal entities without a domain decision.

Validate required and structural constraints locally, then enforce authoritative business rules on the server. Do not flash errors before a user has had an opportunity to enter the value. On submission, provide a summary for multi-field errors and associate each message with its field. Retain valid values and place focus deliberately; avoid moving it on every keystroke. For asynchronous uniqueness checks, cancel stale requests or ignore out-of-date responses. A late “available” response for an old value must never clear the current value’s error. A successful precheck is not a reservation: handle server-side uniqueness conflicts at save time.

StateVisible behaviorSafety responsibility
EditingClear draft state and enabled relevant controlsTrack unsaved changes without leaking sensitive data
ValidatingExplain checks that delay submissionKeep stale results from overwriting newer input
SendingBaseButton :loading and stable action textPrevent duplicate invocation; retain operation identity
Accepted for background workShow queued/running state and a status destinationDo not claim processing is complete
SucceededShow the saved identifier and correct business stateReconcile the server response and clear only saved changes
FailedPersistent explanation plus appropriate feedbackPreserve safe input and offer a scoped retry
Unknown outcomeExplain uncertainty and offer status checkingDo not blindly repeat a payment or posting request

Disabling a button is a UI guard, not idempotency; consequential writes need the backend contract. After a timeout, distinguish a rejected request from a request that may already have committed. If the server accepted a job, resume from its status rather than creating another job on refresh. Progress percentages require a real denominator; otherwise use truthful indeterminate progress.

For a version conflict, show that the record changed, preserve safe edits, and offer comparison with the latest version. Never silently overwrite another user’s change or automatically retry with a new version number. If permissions change mid-edit, explain that saving is no longer allowed and avoid promising a successful retry. Do not keep a tenant-A draft active after switching to tenant B. Offline behavior must reflect actual capabilities: this guide does not promise an offline mutation queue. For payment, approval, and posting, require confirmed connectivity and status reconciliation before any retry. Avoid persisting payroll, bank, or identity data in browser storage as an unreviewed draft shortcut.

Use ConfirmGate for consequential actions with explicit title, message, and action-specific confirmLabel. Its requireText may add friction for exceptional irreversible operations, but is not authentication or authorization. The inspected gate closes before emitting confirm; keep subsequent progress and errors in the parent view. Present full amounts, currency, beneficiary, period, selection count, and reversal policy where relevant. Do not require a destructive-looking confirmation for every harmless field edit. Unsaved-change navigation should offer a clear choice; never claim a draft was saved without persistence evidence.

  • Keyboard-only users can enter values, resolve errors, review, submit, and recover.
  • Both locales cover helper text, asynchronous checks, validation, and unknown outcomes.
  • Duplicate clicks, timeout after commit, stale validation, version conflict, and permission loss are tested.
  • Server validation, tenant scope, audit, and idempotency remain authoritative.
  • Financial values retain precision and are never silently converted or rounded for convenience.
  • Closing a dialog does not hide the only error or leave a mutation without visible status.
  • Sensitive input preservation, navigation guards, and offline behavior are explicitly documented.

See feedback for message placement and accessibility for financial error prevention.