> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Forms & Workflow All Forms

> Browse, search, filter, and manage all forms — with a visual form builder for creating new forms with fields, wizard configuration, and PDF preview.

The All Forms screen lists every form in the organization and is available at `/fw/forms`.

## Overview

This screen renders a searchable, filterable table of forms scoped to the current organization. Each row shows the form name, status (`draft`, `published`, or `archived`), and per-form statistics loaded via `useFormStats`. Users with `fw.forms.create` may create a new form via the **New Form** button in the page header. Per-row actions include edit, clone, view analytics, and archive (archive requires a confirmation dialog).

## Who it's for

Requires permission: `fw.forms.view` (`FW_PERMISSIONS.FORMS_VIEW`).

* To create forms, you also need `fw.forms.create`.
* To archive forms, you also need `fw.forms.delete`.

## Finding and managing forms

1. Navigate to `/fw/forms`. The table loads forms for the current organization.
2. Type in the search box to filter by name, or select a status from the status dropdown (`all`, `draft`, `published`, `archived`).
3. Click the row actions menu (three-dot icon) to edit, clone, view analytics, or archive a form.
4. If archiving, confirm in the alert dialog that appears before the action is applied.

* **FormStatus** — one of `draft`, `published`, `archived`; controls badge color and filtering.
* **Clone** — creates a copy of an existing form within the same organization.
* **Analytics** — navigates to `/fw/analytics/:formId` for per-form submission analytics.

## Creating a form

The New Form page opens the Form Editor in creation mode at `/fw/forms/new`. It uses the same `FormEditor` component as the edit route; when no `id` query parameter is present the editor creates a new form on save. Requires `fw.forms.create`, enforced by `RequirePermission` in `src/routes/fw.tsx`.

The Form Editor provides a visual builder. Tabs include: Builder (field list and metadata), Wizard (multi-step configuration), and — once the form is saved — Portal, PDF Preview, Permissions, and Versions. A live preview panel can be toggled on or off.

Before you start: plan the form name and the fields needed before opening the editor. The editor validates that the name is non-empty and that at least one field exists before allowing a save. Each field requires a `field_key`, `field_type`, and `label`.

1. Navigate to `/fw/forms/new` or select **New Form** from the Forms list.
2. Enter a **Form Name** (required) and optional **Description** in the Form Details card.
3. Optionally toggle **Analytics Tracking** on or off.
4. Add fields using **Add Field**. For each field, configure key, type, label, and any validation rules in the `FieldEditorDialog`.
5. Reorder fields by dragging within the `DraggableFieldList`.
6. Use **Quality Score** to evaluate the field configuration, or **Suggest with AI** to receive AI-generated field suggestions.
7. Optionally switch to the **Wizard** tab to configure multi-step wizard behavior.
8. Select **Save Form**. On success the editor redirects to `/fw/forms/edit?id=<newFormId>` where portal, PDF, permissions, and version history tabs become available.
9. To publish the form for submissions, use the **Publish** button (available after saving when the form is in `draft` status).

* **Field key** — A unique identifier for the field within the form; used in `submission_data` JSON.
* **Wizard configuration** — Enables multi-page wizard mode for the form via `WizardConfigPanel`. Requires `pages` to be configured.
* **PDF Preview** — A client-side preview of how the form renders as a PDF, using `PdfPreviewPanel`. Toggleable sample data shows placeholder values per field type.
* **Prefill rules** — Shown in the Builder tab when a field is selected, allowing rules to auto-populate field values.
* **Draft vs. published** — A form starts as `draft`. Publishing creates a version and makes the form available for submissions.

## Related

<Columns cols={2}>
  <Card title="Forms & Workflow" icon="diagram-project" href="/fw/overview">
    Forms & Workflow core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/fw\.tsx
  * src/cores/fw/pages/FormsList.tsx
  * src/cores/fw/pages/FormEditor.tsx
  * src/platform/forms/hooks/useFormStats.ts
  * src/platform/forms/useFormList.ts
  * src/platform/forms/useFormDefinition.ts
  * src/platform/forms/useFormMutation.ts
  * src/cores/fw/components/DraggableFieldList.tsx
  * src/cores/fw/components/FieldEditorDialog.tsx
  * src/platform/permissions/constants.ts
</Accordion>
