Filling Out Documents

Once a document instance has been assigned and the worker opens it, they enter the form-filling phase. This page covers the worker experience: how fields are displayed, how auto-fill works in practice, how progress is saved, and what validation rules apply before submission.

Form Layout

Document forms are rendered based on the template's field definitions. Fields are organized into sections (if defined) and displayed in sort order within each section.

Section Rendering

If a template defines sections, fields are grouped under section headers:

Personal Information
├── First Name .............. [Nathaniel]     (auto-filled)
├── Last Name ............... [Maddox]        (auto-filled)
├── Email ................... [hello@otesse.com] (auto-filled)
└── Phone ................... [(541) 555-0123]   (auto-filled)

Address
├── Street .................. [123 Main St]   (auto-filled)
├── City .................... [Eugene]        (auto-filled)
├── State ................... [OR]            (auto-filled)
└── ZIP ..................... [97401]         (auto-filled)

Tax Information
├── SSN ..................... [***-**-4567]   (auto-filled, masked)
└── Filing Status ........... [Select...]     (manual entry)

Signature
├── Legal Name .............. [              ] (signature field)
└── Date .................... [auto-dated]

Fields without a section assignment appear under a default "General" section.

Field Types

Each field type renders as an appropriate input control:

TypeInput ControlNotes
textSingle-line text inputStandard text entry
textareaMulti-line text areaFor longer responses
dateDate pickerCalendar widget with manual entry fallback
numberNumeric inputWith increment/decrement controls
booleanCheckboxFor yes/no or acknowledgment fields
signatureSignature inputSpecial handling (see E-Signature Workflow)
addressStructured address groupStreet, city, state, ZIP as connected fields
ssnMasked text inputShows last 4 digits, encrypts full value
bank_accountMasked text inputSimilar masking behavior to SSN
phonePhone inputWith formatting and country code
emailEmail inputWith format validation
selectDropdownOptions defined in template field configuration

Saving Progress

Workers do not need to complete a document in one sitting. The system saves field values individually:

  1. When a worker tabs away from a field or clicks elsewhere, the current field value is saved automatically
  2. Each save triggers the saveFieldValue mutation, which persists the value to the instance data
  3. If the instance status is "required," the first field save transitions it to "draft"
  4. Workers can close the form and return later — all saved values are preserved
  5. The form shows a subtle "Saved" indicator after each successful save

Save Behavior by Status

StatusCan SaveNotes
RequiredYes (transitions to draft)First save triggers status change
DraftYesStandard editing mode
Pending ReviewNoLocked during admin review
CompletedNoPermanently locked
ExpiredNoArchived, read-only

Validation Rules

Before a document can be submitted, all required fields must pass validation:

Field-Level Validation

RuleBehavior
Required field is emptyRed border, error message: "This field is required"
Email format invalidError message: "Enter a valid email address"
Phone format invalidError message: "Enter a valid phone number"
SSN format invalidError message: "Enter a valid Social Security number"
Date is invalidError message: "Enter a valid date"
Number out of rangeError message with min/max bounds

Form-Level Validation

When the worker clicks "Submit" or "Sign," the system validates all fields at once:

  • All required fields must have values
  • All field-level validations must pass
  • If any validation fails, the form scrolls to the first error and highlights all invalid fields
  • The submit/sign button remains disabled until all validations pass

Auto-Fill Indicators

Auto-filled fields display a small indicator showing that the value came from the worker's profile. This gives workers confidence about where the data originated and whether they need to verify it:

  • Auto-filled, not edited: Light blue background with "From your profile" tooltip
  • Auto-filled, manually edited: Normal background, no indicator
  • No auto-fill source: Normal background, standard empty field

Offline and Error Handling

  • Network error during save: The system retries automatically. If the retry fails, a banner appears: "Unable to save. Check your connection and try again."
  • Concurrent editing: If two browser tabs are open on the same document, the last save wins. This is an edge case (workers typically use one tab) but the system handles it gracefully.
  • Session expiry: If the worker's session expires while filling out a form, unsaved changes in the current field are lost. The worker is prompted to log in again, and all previously saved fields are intact.