---
title: "Documentation — PageWeave"
---

> For the full documentation index, see [PageWeave Documentation](https://pageweave.dev/docs) or fetch [llms.txt](https://pageweave.dev/llms.txt).

# Forms

Versioned forms with owner notifications, a visitor confirmation email ("receipt"), webhooks, spam protection, and file uploads. Managed via the `list_forms` / `create_form` / `update_form` / `update_form_settings` MCP tools.

## Creating a Form

`create_form` takes a `fields` array. The creating account is auto-subscribed to submissions; add `recipients` to notify other addresses. A recipient who is not one of your verified addresses receives a confirmation email and starts receiving notifications only after confirming — never add an address without consent.

Field types: `text`, `email`, `textarea`, `select`, `checkbox`, `radio`, `number`, `url`, `tel`, `search`, `range`, `color`, `date`, `datetime-local`, `time`, `month`, `week`, `hidden`, `file`.

## Versions and Submit URLs

Fields, success message, and redirect path are versioned: a change publishes a new version and a new `submit_url` (`/f/<version_id>`), which the page embeds. Form-level settings such as the visitor confirmation email are stored on the form and do not create a version or change the submit URL.

## Notification Recipients

Owner notifications go to per-form recipients.

- The creating account is auto-subscribed. Add recipients on the form's dashboard page or with `subscribe_form`; `list_form_subscriptions` shows masked addresses, status, and block reasons; `unsubscribe_form` removes a recipient.
- Your verified account email and verified additional addresses activate immediately. Every other address is `pending` until it confirms the double-opt-in email.
- A form holds up to 10 active or pending recipients.
- Every notification carries an unsubscribe link. Unsubscribing suppresses the address for form notifications until the address owner resumes from the preference page. Removing a recipient from one form does not suppress the address globally.
- Suppressed addresses (hard bounce or unsubscribe) cannot be added.

This is separate from the visitor confirmation email below: a **subscription confirmation** asks an owner recipient to confirm their address; a **receipt** goes to the visitor after a submission.

## Visitor Confirmation Email (Receipt)

A per-form transactional email sent to the submitter after a successful submission. Off by default; included on every plan.

### Configure

Configure it with `update_form_settings`, or pass `confirmation_email` when creating a form. The REST API accepts the same object on form create/update (see the [API guide](/docs/api/guide)). The dashboard shows status and delivery counts; it is not an editor.

```
update_form_settings(form_id: "...", confirmation_email: {
  enabled: true,
  to_field: "email",
  subject: "We received your message",
  body: "Thanks — we received your message and will reply soon.\n\nReference: {{reference}}",
  reply_to: "hello@example.com"
})
```

| Key | Type | Description |
| --- | --- | --- |
| `enabled` | boolean | Turn the receipt on or off. Default `false`. |
| `to_field` | string/null | Name of the email field that receives the receipt. Required when the form has several email fields. |
| `subject` | string/null | Single-line subject, up to 200 characters. Blank uses localized default copy. |
| `body` | string/null | Plain-text body, up to 5,000 characters. Blank uses localized default copy. Line breaks are preserved; blank lines become paragraphs in the HTML part. |
| `reply_to` | string/null | Optional Reply-To address. Set it so replies reach you. |

Omitted keys keep their stored value; explicit `null` clears one value; `null` for the whole object clears the configuration. Disabling keeps the stored copy, and re-enabling validates it again.

The recipient must be a `type: "email"` field. With exactly one email field it is auto-detected; with several, set `to_field`. Enabling a form with no email field is rejected. A new form version that removes the configured field is rejected until you change `to_field` or disable the receipt.

### Who Receives It

- Only submissions the spam shield accepts (`ham`). Quarantined, discarded, and salvaged submissions never get a receipt.
- The address comes only from an email field. A blank, repeated, or malformed value gets no receipt.
- Suppressed addresses (hard bounce or unsubscribe) never receive one. A hard bounce from a receipt suppresses the address for form mail; a soft bounce fails only that receipt.
- Rate limits: one receipt per address per 10 minutes, three per address per 24 hours, 1,000 per form per hour, and 5,000 per form per day. Throttled receipts are skipped, not queued.

### Copy Rules

The receipt never includes visitor-submitted values. Copy may use only these system placeholders:

`{{website_name}}`, `{{form_name}}`, `{{reference}}`, `{{submitted_at}}`, `{{website_url}}`

A receipt that echoed visitor text to an address the visitor typed would turn the form into a spam relay, so only system values are interpolated. The subject is single-line; the body may contain line breaks and blank lines. There is no open or click tracking and no marketing content.

The receipt uses the submission's language, falling back to the website language and then the default locale. Default subject, body, and system lines are localized in English and German; custom subject or body values replace the corresponding default.

### Delivery Status

The form page shows receipt status and delivered/failed/skipped counts; each submission page shows its receipt state, attempts, and failure reason. The REST API exposes `confirmation_email` on form detail (stored configuration) and submission detail (delivery result).

Delivery is automatic: transient SMTP errors retry with backoff, permanent errors fail closed. There is no resend button. Receipts send from `noreply@form-receipts.pageweave.dev` with your site name as the display name; `reply_to` controls replies.

## File Fields

`file` fields accept visitor uploads:

- `multiple: true` — allow several files
- `accept` — allowed extensions, e.g. `["pdf", "png", "jpg"]`
- `max_size_mb` — per-file cap, 1–25 MB
- `max_files` — per-field cap, 1–10 (needs `multiple`)

Platform ceilings (identical on free and Pro): **25 MB per file, 10 files per field, 100 MB per request**. Field settings may tighten, never exceed, these ceilings.

Allowed types: images (jpg, jpeg, png, gif, webp, avif), documents (pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, rtf). ZIP archives and SVG are deliberately rejected — uploads are judged by sniffed content, not by extension, so a renamed file gets no free pass.

## Submission Flow

Public forms POST multipart to the form's `submit_url` (`/f/<id>`). Any plain input name works — the renderer rewrites file inputs to bracketed names at serve time and multiple files accumulate. Requests over 100 MB are rejected with 413 before parsing.

Every submission passes spam protection (honeypot + ALTCHA proof-of-work, three escalating tiers — see [Security](/docs/security)). Discarded spam never persists files; quarantined submissions keep theirs for owner review.

## Owner Notifications

- **Email** — each recipient notification carries download links, never attachments. Links are permanent capability URLs (unguessable, no expiry) and stop working when the submission is deleted. A submission with files from more than one file field groups them under field-name headings.
- **Webhook** — `form.submission.created` payloads include a `files` array with `field`, `filename`, `size` (bytes), `content_type`, `checksum_md5` (hex), and `url` per file. Every dispatch also carries a `spam` block (`verdict`, `score`, `signals`). Test deliveries mirror the real schema, including a `files` sample. See [Webhooks](/docs/webhooks).
- **Dashboard** — the form's inbox lists submissions with inline download links; the spam tab holds quarantined submissions with their files.
