Form Drafts & Auto-Save

Form Drafts & Auto-Save

NexusRMS automatically saves form input as users type, preventing data loss if they navigate away, close the browser, or lose their internet connection. The FormDraft model powers this feature, storing in-progress form data so users can pick up exactly where they left off.

How It Works

The auto-save process follows a simple lifecycle:

  1. As the user fills in form fields, their input is periodically saved to a FormDraft record in the background.
  2. If the user navigates away or loses connection, the draft is preserved.
  3. When the user returns to the same form, the draft data is automatically restored.
  4. The user continues filling in the form from where they left off.
  5. Once the form is successfully submitted, the draft is deleted.

Saving happens automatically — users do not need to press a save button or take any manual action to preserve their progress.

Supported Form Types

Auto-save drafts are available for the following form types:

  • Project — new project creation and editing
  • Quote — quote preparation and amendments
  • Invoice — invoice creation and editing
  • Equipment — equipment record entry and updates
  • Client — client profile creation and editing
  • Crew Assignment — crew scheduling and assignment forms

Draft Fields

Each FormDraft record stores the following information:

Field Description
User ID The user who owns this draft
Form Type Which form this draft belongs to (e.g. project, quote)
Entity ID Optional — links to an existing record when editing
Data JSON object containing all field values entered so far
Expires At Timestamp when the draft will be automatically deleted
Last Field The field that was active when the user left — restores cursor position

Per-User, Per-Form Drafts

Each user has their own draft for each form type. If two team members are both creating new projects, each has an independent draft. Drafts never interfere with one another across users.

Entity Drafts

When editing an existing record — for example, modifying a project or updating a client profile — the draft is linked to that specific entity via the Entity ID field. This ensures the draft is restored only when the user returns to edit that particular record, not when creating a new one.

Last Field Tracking

The draft remembers which field was active when the user left the form. Upon restoration, the cursor is placed back in that field, allowing the user to resume typing immediately without scrolling or clicking to find their place.

Restore Notification

When a draft is restored, NexusRMS displays a brief notification informing the user that their previous input has been recovered. This confirmation prevents confusion and reassures users that no data has been lost.

7-Day Expiration & Cleanup

Drafts automatically expire after 7 days. A scheduled Laravel task runs daily to delete expired drafts, keeping the database clean. If a user returns after the expiration window, they will start with a fresh form.

Tips

  • Drafts save automatically — no action is needed from users.
  • Encourage team members to complete forms within 7 days to avoid losing draft data.
  • If a draft is not restoring, check that the user is logged in with the same account they used originally.
  • Submitted forms automatically clear their associated draft.

Was this article helpful?