# Fieldwise — Product Requirements (v3.0)

Fieldwise is a form builder. Owners create forms from templates or a blank canvas, arrange and configure questions with drag-and-drop, add conditional logic and multiple pages, preview, publish to a public link, review submissions (filter, export to CSV) and read per-form analytics (completion rate, drop-off per page). There is no sign-in; each browser tab session has its own workspace of six sample forms and 62 responses.

**Problem.** Teams need to collect structured responses without code, and must trust that what the owner designs (order, rules, required fields, limits) is exactly what respondents experience and what the owner later exports.

## Users
- **Form owner** — Build, publish and close forms, then read and export responses and see where respondents drop off.
- **Respondent** — Fill a multi-page form on any device, with clear validation and confirmation.

## Goals
- A saved form is the form respondents see, in the order and with the rules the owner set.
- Validation is identical in the browser and on the server, on every page.
- Exports and counts always reflect exactly what the owner is looking at.

## Forms list (LST)

Home screen with all forms, search and status filter.

- **FR-LST-01** (Must) The list shows every form with status, description, response count, question/page counts and last response date.
  - Heading "Forms" and "6 forms in this workspace"
  - Order: Newsletter preferences, IT access request, Customer feedback survey, Harbour Summit registration, Volunteer sign-up, Q3 pulse check; statuses Draft, Draft, Published, Published, Published, Closed
  - Customer feedback survey: 24 responses, "10 questions · 3 pages", last response 16 Oct 2026
  - Newsletter preferences: 0 responses, "3 questions", "None yet", "No description"
- **FR-LST-02** (Should) Status buttons and the search box narrow the list and update the count line; an unmatched search shows an empty state with Clear filters.
  - Published: "3 forms match"; Draft: "2 forms match"; Closed: "1 form match"
  - Searching "summit" leaves Harbour Summit registration
  - Empty state "No forms match" with "Try a different search or status filter."; Clear filters restores all six

## Create a form (NEW)

New form dialog with templates.

- **FR-NEW-01** (Must) A form is created from a template (Blank form, Contact us, Event registration, Quick survey) and opens in the builder as a Draft.
  - Contact us contains 3 questions: Short text "Your name", Email "Email address", Long text "How can we help?", each Required
  - The new form opens at /forms/f-107 with a Draft pill and appears first in the list ("7 forms in this workspace")
- **FR-NEW-02** (Should) The form name must be 2 to 80 characters and unique; Escape closes the dialog.
  - Empty: "Enter a name for the form"
  - Duplicate: `A form named "Customer feedback survey" already exists`
  - One character: "Form name must be 2 to 80 characters"

## Builder (BLD)

Canvas, palette of 11 element types, properties and options editor.

- **FR-BLD-01** (Must) A blank form can be assembled from the palette, configured and saved; everything survives a reload.
  - A blank form shows "Your form is empty" and a palette of 11 types
  - Adding Short text, Dropdown (default options Option 1 and Option 2) and Rating (5 stars) creates nodes in order
  - Editing marks "Unsaved changes"; Save shows toast "Form saved" and "All changes saved"
- **FR-BLD-02** (Must) Question order can be changed with Move up/down and with the keyboard on the grip (ArrowUp/ArrowDown) and the saved order is exactly the order shown, also after reload.
  - Newsletter preferences Email address, Topics, Frequency; Move up twice gives Frequency, Email address, Topics
  - Move up is disabled on the first question
  - Save then reload keeps that order
- **FR-BLD-03** (Should) Dragging a palette element or a question grip with the pointer shows a drop line and inserts or moves the question at the drop position.
  - Dropping Date above Topics inserts a selected "Date question" between Email address and Topics
  - Dropping at the bottom appends
- **FR-BLD-04** (Should) The properties panel edits label, required flag and placeholder, updating the canvas immediately; a blank label is flagged.
  - Placeholder text appears in the canvas input
  - Switching Required off removes the Required badge
  - Empty label: "Add a label before publishing"
  - Saving a changed label shows "Form saved" and the new node title
- **FR-BLD-05** (Should) The options editor adds, moves and removes options and enforces unique values and a minimum of two options for publishing.
  - Add option appends "Option 3"; Move option 3 up reorders
  - Duplicate value (compared case-insensitively): "Options must be unique"
  - With one option left: "Add at least two options to publish" and its remove button is disabled

## Conditional logic (LOG)

Show-when rules between questions.

- **FR-LOG-01** (Should) The Logic tab lists the form’s rules in plain language with a count badge, and conditional questions carry a "Conditional" badge in the builder.
  - Customer feedback survey: badge 1; rule "Show "What went wrong?" when "Overall rating" is less than 3 stars"
  - A form without rules shows "No rules yet" and an "Add rule" button
- **FR-LOG-02** (Must) A rule can be created from target, source, condition and value and takes effect in Preview, showing and hiding the target as the answer changes.
  - Adding "Show Frequency when Topics contains Events": Frequency is hidden until "Events" is ticked and hidden again when unticked
  - The Value control follows the source question’s options
  - Delete rule returns to "No rules yet"
- **FR-LOG-03** (Must) The comparison "is less than" is strict: a rating below 3 reveals the follow-up question and a rating of exactly 3 does not. A revealed question is required and counts toward validation.
  - Rating 2: "What went wrong?" appears with a required marker and a "0 / 300" counter
  - Rating 3, 4 or 5: it stays hidden
  - Leaving it empty: "This question is required"
- **FR-LOG-04** (Should) Registration form rules show Workshop track only for the "Workshop pass" ticket and "Please list your allergies" only when "Nut allergy" is ticked; both are required while visible.
  - Initially neither is shown
  - Choosing VIP hides Workshop track again; unticking Nut allergy hides the allergies question

## Public form and validation (FIL)

Multi-page respondent experience with a progress bar.

- **FR-FIL-01** (Must) A multi-page form shows progress ("Page n of N" with percentage), moves with Next/Back keeping answers, and a complete response ends on a thank-you screen with a submission ID.
  - Customer feedback survey starts at "Page 1 of 3" 33%, then "Page 2 of 3 · Your experience" 67%, "Page 3 of 3 · Final thoughts" 100% with the button "Submit"
  - Result: "Response submitted", "Thank you for your feedback, it helps us improve." and a Submission ID such as "S-1063"
  - Back returns to earlier pages with answers preserved
- **FR-FIL-02** (Must) Required and format rules are checked on every page before Next and before Submit, in the browser and on the server; the first invalid question gets focus.
  - Empty page 1: banner "Fix 3 questions to continue" and "This question is required" under Full name, Email address and Overall rating; still on page 1
  - Invalid email: "Enter a valid email address"
  - An empty required question on page 2 shows "This question is required" and the respondent stays on page 2
  - The final submit rejects a response with an unanswered required question on any page
- **FR-FIL-03** (Must) Number questions enforce their range inclusively and reject non-numbers; Age on the registration form accepts 18 through 99.
  - 17: "Must be at least 18" and no submission is created
  - 100: "Must be at most 99"
  - "abc": "Enter a number"
  - 18 and 99 are accepted
- **FR-FIL-04** (Must) A valid single-page submission is accepted and appears in the owner’s Submissions with device and answers.
  - Registration: "Response submitted", "You are registered. A confirmation is on its way."
  - Submissions then shows "19 responses" with the new response first, device Desktop, and its detail dialog lists every answer
- **FR-FIL-05** (Should) A closed form shows a notice instead of questions.
  - "This form is closed and no longer accepts responses" and "If you think this is a mistake, contact the form owner."; no inputs or submit button
- **FR-FIL-06** (Could) Unknown links and unpublished (draft) forms show "Form not found".
  - "This form is not available. The link may be wrong, or the form has not been published."

## Publish and close (PUB)

Making a form live and taking it offline.

- **FR-PUB-01** (Must) Publishing a draft makes it live at a public URL and shows the link.
  - Dialog "Your form is live" with the link containing /forms/f/newsletter-preferences, "Copy link" (becomes "Copied"), "Done", "Open public form"
  - The pill becomes Published and a "Share" button replaces "Publish"
  - The public page shows the form’s questions
- **FR-PUB-02** (Should) A form with no questions cannot be published and the reason is shown.
  - Toast "Cannot publish: Add at least one question before publishing"; banner "Not ready to publish"; pill stays Draft
  - After adding one question publishing succeeds
- **FR-PUB-03** (Should) Closing responses requires confirmation and is reflected on the public link; a closed form can be reopened.
  - "Close this form?" with "Close form" and "Cancel"; Cancel changes nothing
  - Toast "Form closed", pill Closed, "Reopen" shown, and the public link shows the closed notice
  - Reopen shows "Your form is live" and the pill Published

## Submissions (SUB)

Response table, filters, detail, export and delete.

- **FR-SUB-01** (Should) The Submissions tab lists responses with ID, submitted time, device and answers, 10 per page, newest first.
  - Customer feedback survey: tab badge 24, "24 responses", headers ID, Submitted, Device, Full name, Email address, Date of stay, Time
  - First row S-1024, 16 Oct 2026, 08:41, Desktop, Sofia Marchetti
  - Pager "Page 1 of 3" with Previous disabled; page 3 ends with S-1004 … S-1001 and Next disabled
- **FR-SUB-02** (Should) Device, date range and search filters combine, the count line states how many responses match, and no match shows an empty state.
  - Mobile: "11 responses match the filters"
  - From 2026-10-10: 4 responses (S-1022, S-1021, S-1019, S-1018); From 10-10 to 10-12: 3 responses
  - Search "Mei": 2 responses (S-1023, S-1010)
  - No match: "No responses match" with Clear filters; "Oldest first" starts at S-1001
- **FR-SUB-03** (Could) Opening a response shows a dialog with every question and its answer plus submit metadata.
  - S-1023: "Submitted 15 Oct 2026, 13:39 UTC from Desktop in 2:31"; Overall rating 2; Which services did you use? "Spa; Restaurant"; unanswered optional question "No answer"
- **FR-SUB-04** (Must) Export CSV contains exactly the responses currently matching the filters and the toast reports that number.
  - No filter: file f-101-submissions.csv, toast "Exported 24 responses to CSV"
  - Device Mobile: toast "Exported 11 responses to CSV", header row plus 11 rows all Mobile
  - Device Tablet: "Exported 4 responses to CSV"
- **FR-SUB-05** (Could) Deleting a response needs confirmation, then updates counts everywhere.
  - Dialog "Delete this response?" — "Response S-1024 will be permanently removed and excluded from exports and analytics."
  - Cancel keeps it; confirming shows "Deleted response S-1024", "23 responses" and tab badge 23

## Analytics (ANA)

Completion rate and per-page drop-off.

- **FR-ANA-01** (Must) Analytics shows Views, Started, Completed, Completion rate (completed ÷ started) and Average time, with a drop-off row per page whose figures agree with the events. Data may take about 2 seconds to load, showing skeleton rows meanwhile.
  - Customer feedback survey: Views 138; Started 64; Completed 24; Completion rate 37.5%; Average time 3:28
  - Drop-off: Page 1 reached 64, dropped 17, 26.6%; Your experience 47, 14, 29.8%; Final thoughts 33, 9, 27.3%
  - Devices: Desktop 9, Mobile 11, Tablet 4
- **FR-ANA-02** (Could) A one-page form has a single drop-off row and a form with no traffic shows an empty state.
  - Harbour Summit registration: Views 96; Started 41; Completed 18; 43.9%; Average time 4:05; one row "Page 1" reached 41, dropped 23, 56.1%
  - Newsletter preferences: "No activity yet" with "Analytics fill in once people open the public link. Publish the form and share it to get started."

## Preview (PRV)

Try a draft exactly as a respondent would.

- **FR-PRV-01** (Should) Preview runs the real fill flow with the same validation and logic, includes unsaved changes, and never stores a submission.
  - Banner "Preview mode. Answers are checked like a real response but nothing is saved. This preview includes your unsaved changes."
  - IT access request: "Page 1 of 2" 50%; empty Next gives "Fix 3 questions to continue"; choosing Access level "Admin" reveals a required "Approver name"
  - Result "Preview complete" — "Preview only. Nothing was sent and no submission was stored."; Submissions still shows "0 responses"

## API (API)

Form lookup and public submission endpoints.

- **FR-API-01** (Should) The API validates independently of the UI and answers with the proper status code and message.
  - List forms: 200 with total 6
  - Unknown form: 404 "Form f-999 not found"
  - Submitting an empty answer set to Customer feedback survey: 422 with "This question is required" for q1, q2, q4, q7 and q10
  - Submitting to a closed form: 410 "This form is closed and no longer accepts responses"
  - Unknown public slug: 404 "This form is not available"

## Non-functional requirements

- **NFR-01** (Could) At 390 px nothing scrolls sideways: list rows and submissions stack, the palette becomes a row of chips, question properties open in a bottom sheet with Done, and the public form is a single column with 16 px side padding.
- **NFR-02** (Could) At 768 px the builder shows palette above canvas, analytics tiles reflow to a three-column grid, and submission filters wrap without clipping the ID column.
- **NFR-03** (Could) The dark colour scheme keeps all text and controls legible: light text, lighter blue accent, readable status pills and progress bar.

## Glossary and rules

- **Completion rate** — Completed responses divided by people who started the form.
- **Drop-off** — People who reached a page but did not continue to the next.
- **Workspace** — The set of forms and responses private to one browser tab session.

## Out of scope

- Real file storage for upload questions (only name and size are kept)
- Email notifications
- User accounts and sharing between workspaces
