organisms
Contact form
The browser-write contact form on a drafting-sheet surface, with email and message fields, a honeypot, and a status line.
Specimens
{{ ContactForm.render({
sectionId: "specimen-contact",
docNo: "03",
docTitle: "Contact",
sourcePage: "/docs/design/"
}) }}Params
| Param | Type | Description |
|---|---|---|
classes | string, variant map, or array | Applied to the <form> through classes, after the sheet baseline. |
submitLabel | string | Submit button label. Defaults to “Transmit message”. |
sanityProjectId | string | Written to data-sanity-project. |
sanityDataset | string | Written to data-sanity-dataset. |
sanityApiVersion | string | Written to data-sanity-api-version. |
sanityWriteToken | string | Written to data-sanity-write-token. The token is in the page markup. |
sourcePage | string | Value of the hidden sourcePage input. |
sectionId | string | Id prefix for the form’s elements. Defaults to contact. |
docNo | string | Two-digit parent document number, shown as “Doc {docNo} / Transmission Form” and “DOC {docNo}A”. Defaults to 00. |
docTitle | string | Form heading. Defaults to Contact. |
views/templates/contact/contact.njk passes the sanity* params from the env global data. Russ confirmed on 2026-11-06 that the token is write-only and that the exposure is acceptable.
Notes
The macro loads ContactForm.js itself. Never bind env values into a specimen, because the write token lands in the page markup.