Partial submissions
Multi-step forms save progress when a visitor moves to the next step, never on keystrokes. The MultiStep component shows a short notice that answers are saved as they go.
- Each form mount gets a session id (kept in
sessionStorage, so a reload continues the same partial). - Moving to the next page validates that page and sends a
partialsubmission withpageIndex. The server upserts by session id and recordspagesCompleted. - Submitting the last page completes the same record, so the saved pages and the final submit are one response, not two.
- Partials show with status
partialin the dashboard, with the pages completed. The form's settings page shows completion by step. - Partials don't fire the normal email, Slack or webhook notifications; completed submissions do. With unfinished alerts on, an email, Slack or webhook destination also hears about a partial where the person gave an email address and then stopped: once, after the time you pick (10 minutes to 24 hours, counted from their last save). A response finished in time gets only the normal notification.
- Each save (the first page, every later page, the final submit) records when the person was last active, which is what unfinished alerts wait from.
- Partials pass through the same validation and spam checks as full submissions, and are never counted as responses.
Partial submissions show under each form's Responses, Status → Partial, with completion by step under Insights.
Save when the form opens
Some forms open with answers already in them: a signup step that knows the person's email, a link from a campaign with hidden fields. saveOnOpen (0.2.4) saves those as an unfinished response the moment the form opens, so someone who leaves without answering anything still reaches you, through an unfinished alert when there's an email:
<Form schema={signupProfile} client={mirio} saveOnOpen initialValues={{ email: user.email, workspace: org.slug }} />
- It saves once, when the form mounts, with the answers from
initialValuesor the URL (prefill.query, hidden fields), and defaults along with them. Defaults alone don't save, an untouched yes/no or consent isn't sent, and an answer that fails its check is left out. - One-page forms too: the form keeps a session id, and the submit completes the same response, so it's still one response.
- The request is a partial save with
pageIndex: -1: no page is finished, so Mirio checks only the answers it carries (a required question can still be empty) and records 0 pages completed. It only fills in answers the response doesn't have yet, so it never replaces what a page saved, even when it arrives late or the visitor reloads a form they'd half filled in.
After the final submit
A finished response (completed, or marked spam or test after its final submit) never changes from the person's side, so what your team read, was notified about and replied to stays what they sent. The @trymirio/mirio client starts a new session after a successful submit; for anything that still sends the old session id:
- A retry of the final submit with the same
Idempotency-Key(the client retries network failures and 5xx errors with one key) gets the original response back, as before. - A later partial save (a tab left open on an earlier page) changes nothing:
200with the finished response'sidand status. - A later final submit with another key, or none, is a new response of its own, as a second submit of a one-page form is. It doesn't take the session id, which stays with the response it finished, and the first response keeps its answers.
A spam or test row that was never finished (a first page that scored as spam, a multi-step form tried on localhost) is still in progress, and later pages and the final submit complete it as usual.