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

# List forms

> Retrieve a paginated list of forms.

```ts AdonisJS wrap theme={"dark"}
import app from '@adonisjs/core/services/app'
import { SiteClient } from '@fetchski/attract-cms-sdk'

const site = await app.container.make(SiteClient)
const formList = await site.forms().listForms()
```

```json 200 wrap theme={"dark"}
{
  "results": [
    {
      "title": "Example title",
      "contents": {
        "metaType": "area",
        "_id": "clx8m2k4p0000a1b2c3d4e5f6",
        "items": [
          {
            "type": "form-section",
            "_id": "clx8m2k4p0000a1b2c3d4e5f6",
            "metaType": "widget",
            "formFontOverrides": [],
            "formEyebrowEnabled": true,
            "formEyebrow": "Get in touch",
            "formEyebrowColor": "Example form eyebrow color",
            "formEyebrowColorLight": "Example form eyebrow color light",
            "formEyebrowWeight": "bold",
            "formEyebrowSize": "normal",
            "formHeading": "Send us a message",
            "formHeadingColor": "Example form heading color",
            "formHeadingColorLight": "Example form heading color light",
            "formHeadingWeight": "extrabold",
            "formHeadingSize": "normal",
            "formIntro": "Fill out the form below and we’ll get back to you shortly.",
            "formIntroColor": "Example form intro color",
            "formIntroColorLight": "Example form intro color light",
            "formIntroWeight": "normal",
            "formIntroSize": "normal",
            "formBand": "raised",
            "formAccentColor": "Example form accent color",
            "formAccentColorLight": "Example form accent color light",
            "formAlign": "center",
            "formWidth": "normal",
            "formLabelGap": "normal",
            "formBg": "transparent",
            "formBgCustom": "Example form bg custom",
            "formBgLight": "inherit",
            "formBgLightCustom": "Example form bg light custom",
            "formSubmitLabel": "Submit",
            "formSubmitVariant": "solid",
            "formSubmitSize": "normal",
            "formSubmitRadius": "slight",
            "formSubmitColor": "--fetchski-accent",
            "formSubmitColorLight": "Example form submit color light",
            "formSubmitTextColor": "--fetchski-ink",
            "formSubmitTextColorLight": "Example form submit text color light",
            "formSubmitHoverColor": "Example form submit hover color",
            "formSubmitHoverColorLight": "Example form submit hover color light",
            "formSubmitStyle": "sweep",
            "formSubmitShadowColor": "Example form submit shadow color",
            "formSubmitShadowColorLight": "Example form submit shadow color light",
            "formSubmitAnimation": "lift-scale",
            "formSubmitIcon": "Example form submit icon",
            "formSubmitIconFamily": "classic-regular",
            "formSubmitIconPosition": "before",
            "formSubmitIconNudge": false,
            "_form": [],
            "sectionCss": {},
            "fields": {}
          }
        ]
      },
      "slug": "example-slug",
      "visibility": "public",
      "scheduledPublish": "Example scheduled publish",
      "scheduledUnpublish": "Example scheduled unpublish",
      "thankYouHeading": "Example thank you heading",
      "thankYouBody": {
        "metaType": "area",
        "_id": "clx8m2k4p0000a1b2c3d4e5f6",
        "items": [
          {
            "type": "@apostrophecms/rich-text",
            "_id": "clx8m2k4p0000a1b2c3d4e5f6",
            "metaType": "widget",
            "content": "<p>Hello from the API.</p>",
            "sectionCss": {}
          }
        ]
      },
      "sendConfirmationEmail": true,
      "emailConfirmationField": "jo@acme.example",
      "emails": [],
      "email": "jo@acme.example",
      "googleSheetSubmissions": true,
      "googleSpreadsheetId": "clx8m2k4p0000a1b2c3d4e5f6",
      "googleSheetName": "Example google sheet name",
      "submitLabel": "Example submit label",
      "enableRecaptcha": true,
      "enableQueryParams": true,
      "queryParamList": [],
      "formActions": [],
      "archived": false,
      "_id": "clx8m2k4p0000a1b2c3d4e5f6",
      "type": "Example type",
      "createdAt": "2026-10-24T09:30:00.000Z",
      "updatedAt": "2026-10-24T09:30:00.000Z",
      "aposShareKey": "k3v9x2m7q1z8w4p6"
    }
  ],
  "pages": 1,
  "currentPage": 1
}
```

## In your app

A controller answers a route on your app: it calls `listForms()` and returns the answer.

**1. Add the controller**

```ts app/controllers/list_forms_controller.ts theme={"dark"}
import { inject } from '@adonisjs/core'
import { SiteClient } from '@fetchski/attract-cms-sdk'

@inject()
export default class ListFormsController {
  constructor(protected site: SiteClient) {}

  async handle() {
    return this.site.forms().listForms()
  }
}
```

**2. Add the route**

```ts start/routes.ts theme={"dark"}
import router from '@adonisjs/core/services/router'

const ListFormsController = () => import('#controllers/list_forms_controller')

router.get('/form', [ListFormsController])
```

**3. Call it**

```bash Terminal theme={"dark"}
curl http://localhost:3333/form
```

With `node ace serve` running, it prints its answer as JSON.

> [accordion] Optional parameters
>
> One object, e.g. `listForms({ page })`; leave out the optional fields.
>
> **page** `number | null | undefined`
>
> **Optional.** Leave it out and the site uses `1`. Page number for pagination (1-based)
>
> **perPage** `number | null | undefined`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Documents per page. Each content type has its own default (core’s is 50; a type may set another). There is no upper limit: a large value answers the whole list at once, which is slow on a big one. At least 1.
>
> **search** `string | null | undefined`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Matches documents by their text. Ignored for the public and API keys on a type whose public fields leave some out (a search would match the hidden ones).
>
> **aposMode** `AposMode | null | undefined`
>
> **Optional.** Leave it out and the site uses `"published"`. `published` (the default) or `draft`. Drafts need a credential that may see them: an API key with the type’s write scope (`content:<type>:write`), or a signed-in editor. The public and a key with only the read scope get 403. One of `draft`, `published`.
>
> **aposLocale** `string | null | undefined`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. The locale to read or write, e.g. `en` (default: the site’s default locale).
>
> **renderAreas** `boolean | null | undefined`
>
> **Optional.** Leave it out and the site uses `false`. true: each area’s widgets come back rendered as HTML (`_rendered`), beside their data.
>
> **slug** `string | null | undefined`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Only the document with exactly this slug: a list of one, or an empty list when none has it. Use it to find a document by the name in its URL.

> [accordion] Returns
>
> A `FormList`. A page of Form documents. Read its properties (`formList.results`): each says whether the site always sends it. The example answer is the site’s wire JSON: some keys differ from the property names (`_id` → `id`, `_form` → `form`, `_destination` → `destination`).
>
> **results** `readonly Form[]`
>
> **Always sent.** A list of `Form`. This page’s documents; empty past the last page.
>
> **Form**
>
> Form content type
>
> **title** `string`
>
> **Always sent.** Its title: the name it goes by in every list, and the heading of its page where it has one.
>
> **slug** `string`
>
> **Always sent.** The URL name: lowercase words joined by hyphens (letters outside a–z, even emoji, are kept).
>
> **visibility** `Visibility`
>
> **Always sent.** Select whether this content is public or private. One of `public`, `loginRequired`; a newer site may send others, so keep a fallback.
>
> **email** `string`
>
> **Always sent.** The "from" address on this form's emails. A new form starts with the Email in Site settings → Brand; change it here for this form.
>
> **id** `string`
>
> **Always sent.** The document’s id. On a type with drafts it ends in its locale and mode (`…:en:published`, `…:en:draft`): the part before the first colon is its `aposDocId`, shared by both copies. The `{_id}` the type’s routes take.
>
> **type** `string`
>
> **Always sent.** The document type’s name: always this type’s.
>
> **createdAt** `Date`
>
> **Always sent.** When it was created (ISO 8601). Format: an ISO 8601 date and time.
>
> **updatedAt** `Date`
>
> **Always sent.** When it last changed (ISO 8601). Format: an ISO 8601 date and time.
>
> **contents** `FormSectionArea`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A `FormSectionArea`. Widgets, top to bottom: send `{ "items": [ … ] }`, one object per widget with its `type`. Writing it replaces the whole area. A new document starts with `form-section`.
>
> **FormSectionArea**
>
> **metaType** `AfterContentAreaMetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `area`. One of `area`; a newer site may send others, so keep a fallback.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The area’s id, set by the site: leave it out when you write one.
>
> **items** `readonly FormSectionWidget[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `FormSectionWidget`. The widgets, top to bottom. Each is an object with its `type` and that widget’s own fields; `_id` and `metaType` may be left out (the site sets them). At most 1 items.
>
> **FormSectionWidget**
>
> A `form-section` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormSectionWidgetType`
>
> **Always sent.** The widget’s type: always `form-section`. One of `form-section`; a newer site may send others, so keep a fallback.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **formFontOverrides** `readonly FormSectionWidgetFormFontOverridesItem[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `FormSectionWidgetFormFontOverridesItem`. Optional. Set part of this form in a different typeface. Leave empty to follow the site’s fonts (Site design → Typography). At most 4 items.
>
> **FormSectionWidgetFormFontOverridesItem**
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **target** `Target | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Which text this typeface replaces. Rows apply in order, so a broad row (Everything) followed by a narrow one (Headings) gives the section a base face plus an exception. One of `all`, `heading`, `body`, `eyebrow`, `button`, `code`; a newer site may send others, so keep a fallback.
>
> **source** `Source | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Where the typeface comes from. The first option costs nothing extra — those faces are already loaded. The others load an additional font on pages that use this section. One of `slot`, `curated`, `cdn`, `upload`; a newer site may send others, so keep a fallback.
>
> **slot** `Slot | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Set in Site design → Typography. Following the site’s own faces keeps a section on-brand and adds no download. One of `display`, `body`, `accent`; a newer site may send others, so keep a fallback.
>
> **curated** `Curated | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Vetted families from Bunny Fonts and Fontshare, with their available weights already verified. One of `archivo`, `bricolage-grotesque`, `clash-display`, `courier-prime`, `dm-mono`, `dm-sans`, `fira-code`, `fraunces`, `general-sans`, `ibm-plex-mono`, `ibm-plex-sans`, `inconsolata`, `inter`, `jetbrains-mono`, `karla`, `lora`, `manrope`, `nunito-sans`, `outfit`, `playfair-display`, `public-sans`, `red-hat-mono`, `satoshi`, `sentient`, `sora`, `source-code-pro`, `source-sans-3`, `source-serif-4`, `space-grotesk`, `space-mono`, `spline-sans-mono`, `supreme`, `switzer`, `syne`, `ubuntu-mono`, `unbounded`, `victor-mono`, `work-sans`, `zodiak`; a newer site may send others, so keep a fallback.
>
> **cdnProvider** `CdnProvider | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Where to browse for the family. Pick one, then follow the link below to find the exact name. One of `bunny`, `fontshare`; a newer site may send others, so keep a fallback.
>
> **cdnFamily** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Exactly as the provider’s catalog spells it, e.g. "Space Grotesk" or "Clash Display". A name the provider doesn’t have loads nothing and this row is ignored.
>
> **cdnWeights** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Comma-separated weights to load, e.g. 400, 700. Empty loads 400, 500, 700. Weights the family doesn’t ship are skipped by the CDN and synthesized by the browser (faux bold) — but a family that ships only ONE weight (Acme, for instance) loads nothing at all unless that weight is among these, so set it explicitly if the typeface doesn’t appear.
>
> **uploads** `readonly FormSectionWidgetFormFontOverridesItemUploadsItem[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `FormSectionWidgetFormFontOverridesItemUploadsItem`. One file per weight/style of the SAME typeface. woff2 strongly recommended (smallest, universally supported); woff/ttf/otf also accepted. At most 4 items.
>
> **FormSectionWidgetFormFontOverridesItemUploadsItem**
>
> **file** `Readonly\<Record\<string, unknown\>\>`
>
> **Always sent.** File attachment reference.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **weight** `Weight | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Weight. One of `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`; a newer site may send others, so keep a fallback.
>
> **style** `Style | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Style. One of `normal`, `italic`; a newer site may send others, so keep a fallback.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **fallback** `Fallback | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Generic system font shown while this typeface loads (and if it fails). Curated picks set this automatically. One of `sans`, `serif`, `mono`; a newer site may send others, so keep a fallback.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **formEyebrowEnabled** `boolean`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Show eyebrow.
>
> **formEyebrow** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Small label shown above the title.
>
> **formEyebrowColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional. Overrides the eyebrow + its dash. Leave empty to use the secondary (mint) color.
>
> **formEyebrowColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme color, then the mint default.
>
> **formEyebrowWeight** `FormEyebrowWeight | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Eyebrow weight. One of `normal`, `medium`, `semibold`, `bold`, `extrabold`; a newer site may send others, so keep a fallback.
>
> **formEyebrowSize** `FormEyebrowSize | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Eyebrow size. One of `small`, `normal`, `large`, `xlarge`; a newer site may send others, so keep a fallback.
>
> **formHeading** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Heading.
>
> **formHeadingColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional — leave empty to track the theme text color.
>
> **formHeadingColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme color.
>
> **formHeadingWeight** `FormHeadingWeight | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Weight. One of `normal`, `medium`, `semibold`, `bold`, `extrabold`; a newer site may send others, so keep a fallback.
>
> **formHeadingSize** `FormHeadingSize | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Size. One of `small`, `normal`, `large`, `xlarge`, `xxlarge`; a newer site may send others, so keep a fallback.
>
> **formIntro** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Optional short sentence under the heading.
>
> **formIntroColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional — leave empty to use the muted text color.
>
> **formIntroColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme color.
>
> **formIntroWeight** `FormIntroWeight | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Weight. One of `normal`, `medium`, `semibold`, `bold`, `extrabold`; a newer site may send others, so keep a fallback.
>
> **formIntroSize** `FormIntroSize | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Size. One of `small`, `normal`, `large`, `xlarge`, `xxlarge`; a newer site may send others, so keep a fallback.
>
> **formBand** `FormBand | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Plain sits on the page; Raised is a contained card; Accent is a solid brand-color band. One of `plain`, `raised`, `accent`; a newer site may send others, so keep a fallback.
>
> **formAccentColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. The accent band color. Leave empty to use the site accent color.
>
> **formAccentColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme color, then the accent.
>
> **formAlign** `FormAlign | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Alignment of the section header (the form fields stay left-aligned for legibility). One of `center`, `left`; a newer site may send others, so keep a fallback.
>
> **formWidth** `FormWidth | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Content width. One of `narrow`, `normal`, `wide`; a newer site may send others, so keep a fallback.
>
> **formLabelGap** `FormLabelGap | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Vertical space between each field’s label and its input. One of `compact`, `normal`, `roomy`, `spacious`; a newer site may send others, so keep a fallback.
>
> **formBg** `FormBg | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. The section’s full-width background band in dark mode. Transparent lets the page background show through. The palette options track the site colors; choose “Custom color…” for a specific color. One of `transparent`, `surface`, `raised`, `sunken`, `hill`, `accent-soft`, `custom`; a newer site may send others, so keep a fallback.
>
> **formBgCustom** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Used when “Section background (dark theme)” is set to Custom color.
>
> **formBgLight** `FormBgLight | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. “Match dark theme” reuses the dark-theme choice; otherwise set the light-mode band independently. One of `inherit`, `transparent`, `surface`, `raised`, `sunken`, `hill`, `accent-soft`, `custom`; a newer site may send others, so keep a fallback.
>
> **formBgLightCustom** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Used when “Section background (light theme)” is set to Custom color.
>
> **formSubmitLabel** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The visible button text. Leave empty to hide the button.
>
> **formSubmitVariant** `FormSubmitVariant | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Solid fills with the color; Outline / Soft / Text link use it for the border + text. One of `solid`, `outline`, `soft`, `link`; a newer site may send others, so keep a fallback.
>
> **formSubmitSize** `FormSubmitSize | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Button size. One of `small`, `normal`, `large`; a newer site may send others, so keep a fallback.
>
> **formSubmitRadius** `FormSubmitRadius | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Corner radius. One of `pill`, `rounded`, `slight`, `square`; a newer site may send others, so keep a fallback.
>
> **formSubmitColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Solid fill, or the border + text for the other styles. Defaults to the brand accent; CLEAR it for a transparent, outline-only button.
>
> **formSubmitColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme color. (Brand tokens already flip per theme.)
>
> **formSubmitTextColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. The text/icon color. Clear it to derive from the button color (readable on solid fills).
>
> **formSubmitTextColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme label color.
>
> **formSubmitHoverColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional. Drives the hover treatment. Leave empty to derive it from the button color.
>
> **formSubmitHoverColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme hover color.
>
> **formSubmitStyle** `FormSubmitStyle | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. The hover treatment: a soft shadow, a colored offset shadow, a glow, a fill sweep, or a thicker border. One of `none`, `single`, `dual`, `glow`, `sweep`, `thicken`; a newer site may send others, so keep a fallback.
>
> **formSubmitShadowColor** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional. The offset-shadow or glow color on hover. Leave empty to use the site secondary color.
>
> **formSubmitShadowColorLight** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Optional light-theme override. Falls back to the dark-theme shadow color.
>
> **formSubmitAnimation** `FormSubmitAnimation | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Hover motion. One of `lift`, `scale`, `lift-scale`, `none`; a newer site may send others, so keep a fallback.
>
> **formSubmitIcon** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Any Font Awesome icon name, e.g. star, bolt, arrow-left-to-bracket (no “fa-” prefix). Browse at fontawesome.com/icons.
>
> **formSubmitIconFamily** `FormSubmitIconFamily | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Icon family. One of `classic-regular`, `duotone-regular`, `brands`, `jelly`, `jelly-duo`, `whiteboard`; a newer site may send others, so keep a fallback.
>
> **formSubmitIconPosition** `FormSubmitIconPosition | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Which side of the label the icon sits on (when an icon name is set). One of `before`, `after`; a newer site may send others, so keep a fallback.
>
> **formSubmitIconNudge** `boolean`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The icon slides toward its side on hover (e.g. an arrow edges outward).
>
> **form** `readonly Readonly\<Record\<string, unknown\>\>[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The Form record that stores this form’s submissions and routes them (its Actions / integrations / Google Sheet). Create one in the Forms manager. The fields themselves are built right here on the page. The related `@apostrophecms/form` documents, in order (empty when none). To set it, send a list of `{ "_id": "…" }`, one per document (one at most); a document the site can’t find is left out. At most 1 items.
>
> **sectionCss** `CustomCSS | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. A `CustomCSS`. CSS for this one section, typed into the slot of the part it styles. It wins over Site design → Custom CSS. Nested rules like &:hover, @media (width >= 48rem) and \[data-theme="light"] & work inside a slot.
>
> **CustomCSS**
>
> **slots** `Readonly\<Record\<string, string\>\>`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The CSS typed into each part slot, by slot name.
>
> **css** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The compiled CSS (read only: rebuilt from `slots`).
>
> **mark** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The site’s check mark for `css` (read only).
>
> **fields** `FormSectionFieldsArea`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A `FormSectionFieldsArea`. Add and arrange the form’s fields here — edited live on the page. Widgets, top to bottom: send `{ "items": [ … ] }`, one object per widget with its `type`. Writing it replaces the whole area.
>
> **FormSectionFieldsArea**
>
> **metaType** `AfterContentAreaMetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `area`. One of `area`; a newer site may send others, so keep a fallback.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The area’s id, set by the site: leave it out when you write one.
>
> **items** `readonly FormSectionFieldsAreaItem[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `FormSectionFieldsAreaItem`. The widgets, top to bottom. Each is an object with its `type` and that widget’s own fields; `_id` and `metaType` may be left out (the site sets them).
>
> **FormSectionFieldsAreaItem**
>
> A widget in an area that takes `@apostrophecms/form-text-field`, `@apostrophecms/form-textarea-field`, `@apostrophecms/form-file-field`, `@apostrophecms/form-boolean-field`, `@apostrophecms/form-select-field`, `@apostrophecms/form-radio-field`, `@apostrophecms/form-checkboxes-field`, `@apostrophecms/form-conditional`, `@apostrophecms/form-group`, `@apostrophecms/form-divider`, `@apostrophecms/rich-text`: the one its `type` names.
>
> **FormTextFieldWidget**
>
> A `@apostrophecms/form-text-field` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormTextFieldWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-text-field`. One of `@apostrophecms/form-text-field`; a newer site may send others, so keep a fallback.
>
> **fieldLabel** `string`
>
> **Always sent.** Field label.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **required** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Is this field required?
>
> **fieldName** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. No spaces or punctuation other than dashes. If left blank, the form will populate this with a simplified form of the label. Changing this field after a form is in use may cause problems with any integrations.
>
> **inputType** `InputType | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. If you are requesting certain formatted information (e.g., email, url, phone number), select the relevant input type here. If not, use "Text". One of `text`, `email`, `tel`, `url`, `date`, `password`; a newer site may send others, so keep a fallback.
>
> **placeholder** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Text to display in the field before someone uses it (e.g., to provide additional directions).
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormTextareaFieldWidget**
>
> A `@apostrophecms/form-textarea-field` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormTextareaFieldWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-textarea-field`. One of `@apostrophecms/form-textarea-field`; a newer site may send others, so keep a fallback.
>
> **fieldLabel** `string`
>
> **Always sent.** Field label.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **required** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Is this field required?
>
> **fieldName** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. No spaces or punctuation other than dashes. If left blank, the form will populate this with a simplified form of the label. Changing this field after a form is in use may cause problems with any integrations.
>
> **placeholder** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Text to display in the field before someone uses it (e.g., to provide additional directions).
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormFileFieldWidget**
>
> A `@apostrophecms/form-file-field` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormFileFieldWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-file-field`. One of `@apostrophecms/form-file-field`; a newer site may send others, so keep a fallback.
>
> **fieldLabel** `string`
>
> **Always sent.** Field label.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **required** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Is this field required?
>
> **fieldName** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. No spaces or punctuation other than dashes. If left blank, the form will populate this with a simplified form of the label. Changing this field after a form is in use may cause problems with any integrations.
>
> **allowMultiple** `boolean`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Allow multiple file attachments.
>
> **limitSize** `boolean`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Limit file size?
>
> **maxSize** `number | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. In Bytes.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormBooleanFieldWidget**
>
> A `@apostrophecms/form-boolean-field` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormBooleanFieldWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-boolean-field`. One of `@apostrophecms/form-boolean-field`; a newer site may send others, so keep a fallback.
>
> **fieldLabel** `string`
>
> **Always sent.** Field label.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **required** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Is this field required?
>
> **fieldName** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. No spaces or punctuation other than dashes. If left blank, the form will populate this with a simplified form of the label. Changing this field after a form is in use may cause problems with any integrations.
>
> **checked** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. If "yes," the checkbox will start in the checked state.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormSelectFieldWidget**
>
> A `@apostrophecms/form-select-field` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormSelectFieldWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-select-field`. One of `@apostrophecms/form-select-field`; a newer site may send others, so keep a fallback.
>
> **fieldLabel** `string`
>
> **Always sent.** Field label.
>
> **choices** `readonly FormSelectFieldWidgetChoicesItem[]`
>
> **Always sent.** A list of `FormSelectFieldWidgetChoicesItem`. Select input options. Its fields are listed under the first `FormSelectFieldWidgetChoicesItem` above.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **required** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Is this field required?
>
> **fieldName** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. No spaces or punctuation other than dashes. If left blank, the form will populate this with a simplified form of the label. Changing this field after a form is in use may cause problems with any integrations.
>
> **allowMultiple** `boolean`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Allow multiple options to be selected.
>
> **size** `number | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Number of options in the list that should be visible. At least 0.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormRadioFieldWidget**
>
> A `@apostrophecms/form-radio-field` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormRadioFieldWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-radio-field`. One of `@apostrophecms/form-radio-field`; a newer site may send others, so keep a fallback.
>
> **fieldLabel** `string`
>
> **Always sent.** Field label.
>
> **choices** `readonly FormRadioFieldWidgetChoicesItem[]`
>
> **Always sent.** A list of `FormRadioFieldWidgetChoicesItem`. Radio input options. At least 1 items. Its fields are listed under the first `FormRadioFieldWidgetChoicesItem` above.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **required** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Is this field required?
>
> **fieldName** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. No spaces or punctuation other than dashes. If left blank, the form will populate this with a simplified form of the label. Changing this field after a form is in use may cause problems with any integrations.
>
> **allowMultiple** `boolean`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Allow multiple options to be selected.
>
> **size** `number | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Number of options in the list that should be visible. At least 0.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormCheckboxesFieldWidget**
>
> A `@apostrophecms/form-checkboxes-field` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormCheckboxesFieldWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-checkboxes-field`. One of `@apostrophecms/form-checkboxes-field`; a newer site may send others, so keep a fallback.
>
> **fieldLabel** `string`
>
> **Always sent.** Field label.
>
> **choices** `readonly FormCheckboxesFieldWidgetChoicesItem[]`
>
> **Always sent.** A list of `FormCheckboxesFieldWidgetChoicesItem`. Checkbox input options. At least 1 items. Its fields are listed under the first `FormCheckboxesFieldWidgetChoicesItem` above.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **required** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Is this field required?
>
> **fieldName** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. No spaces or punctuation other than dashes. If left blank, the form will populate this with a simplified form of the label. Changing this field after a form is in use may cause problems with any integrations.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormConditionalWidget**
>
> A `@apostrophecms/form-conditional` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormConditionalWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-conditional`. One of `@apostrophecms/form-conditional`; a newer site may send others, so keep a fallback.
>
> **conditionName** `string`
>
> **Always sent.** Form field to check.
>
> **conditionValue** `string`
>
> **Always sent.** Value that activates this group.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **contents** `FormConditionalContentsArea`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A `FormConditionalContentsArea`. aposForm:conditionalContentsHelp Widgets, top to bottom: send `{ "items": [ … ] }`, one object per widget with its `type`. Writing it replaces the whole area. Its fields are listed under the first `FormConditionalContentsArea` above.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormGroupWidget**
>
> A `@apostrophecms/form-group` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormGroupWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-group`. One of `@apostrophecms/form-group`; a newer site may send others, so keep a fallback.
>
> **label** `string`
>
> **Always sent.** Group Label.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **contents** `FormGroupContentsArea`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A `FormGroupContentsArea`. aposForm:groupContentsHelp Widgets, top to bottom: send `{ "items": [ … ] }`, one object per widget with its `type`. Writing it replaces the whole area. Its fields are listed under the first `FormGroupContentsArea` above.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **FormDividerWidget**
>
> A `@apostrophecms/form-divider` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `FormDividerWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/form-divider`. One of `@apostrophecms/form-divider`; a newer site may send others, so keep a fallback.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **RichTextWidget**
>
> A `@apostrophecms/rich-text` widget: its `type` and its own fields. A field left out takes its default.
>
> **type** `RichTextWidgetType`
>
> **Always sent.** The widget’s type: always `@apostrophecms/rich-text`. One of `@apostrophecms/rich-text`; a newer site may send others, so keep a fallback.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The widget’s id, unique on the page. Leave it out for a new widget (the site sets one); keep it to change a widget that is there.
>
> **metaType** `MetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `widget`. One of `widget`; a newer site may send others, so keep a fallback.
>
> **content** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The text as HTML, e.g. `<h2>Our story</h2><p>It began with <strong>one</strong> idea.</p>`. The site keeps the tags and styles this area’s editor offers (paragraphs, headings, bold, italic, links, lists…) and removes the rest.
>
> **sectionCss** `CustomCSS | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. A `CustomCSS`. CSS for this one section, typed into the slot of the part it styles. It wins over Site design → Custom CSS. Nested rules like &:hover, @media (width >= 48rem) and \[data-theme="light"] & work inside a slot. Its fields are listed under the first `CustomCSS` above.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **scheduledPublish** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. An ISO 8601 date and time, e.g. `2026-10-21T14:30:00.000Z`.
>
> **scheduledUnpublish** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. An ISO 8601 date and time, e.g. `2026-10-21T14:30:00.000Z`.
>
> **thankYouHeading** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Thank you message title.
>
> **thankYouBody** `RichTextArea`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A `RichTextArea`. Widgets, top to bottom: send `{ "items": [ … ] }`, one object per widget with its `type`. Writing it replaces the whole area.
>
> **RichTextArea**
>
> **metaType** `AfterContentAreaMetaType`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Always `area`. One of `area`; a newer site may send others, so keep a fallback.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The area’s id, set by the site: leave it out when you write one.
>
> **items** `readonly RichTextWidget[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `RichTextWidget`. The widgets, top to bottom. Each is an object with its `type` and that widget’s own fields; `_id` and `metaType` may be left out (the site sets them). Its fields are listed under the first `RichTextWidget` above.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **sendConfirmationEmail** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Enable this to send a message to the person who submits this form.
>
> **emailConfirmationField** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Enter the "name" value of the field where people with enter their email address. For best results, make sure this field only accepts email addresses.
>
> **emails** `readonly FormEmailsItem[] | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. A list of `FormEmailsItem`. Email Address(es) for Results.
>
> **FormEmailsItem**
>
> **email** `string`
>
> **Always sent.** Email Address for Results. Format: an email address.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **conditions** `readonly FormEmailsItemConditionsItem[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `FormEmailsItemConditionsItem`. For example, if you only notify this email address if the "country" field is set to "Austria". All conditions must be met. Add the email again with another conditional set if needed.
>
> **FormEmailsItemConditionsItem**
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **field** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Only select (drop-down) and checkbox fields can be used for this condition.
>
> **value** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Enter the value an end-user will enter to meet this conditional.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **googleSheetSubmissions** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Submit to Google Spreadsheets.
>
> **googleSpreadsheetId** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Google Spreadsheet ID.
>
> **googleSheetName** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. The name of the sheet tab in your Google spreadsheet where you want the submission appended. If not provided, the first sheet of the spreadsheet will be used.
>
> **submitLabel** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Submit button label.
>
> **enableRecaptcha** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. To use, reCAPTCHA a site ID and secret key must be configured in website code or the website global settings.
>
> **enableQueryParams** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Enable query parameter capture.
>
> **queryParamList** `readonly FormQueryParamListItem[] | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. A list of `FormQueryParamListItem`. Create an array item for each query parameter value you wish to capture.
>
> **FormQueryParamListItem**
>
> **key** `string`
>
> **Always sent.** Key.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **lengthLimit** `number | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Enter a whole number to limit the length of the value saved. At least 1.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **formActions** `readonly FormFormActionsItem[] | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. A list of `FormFormActionsItem`. What happens to each submission, beyond being stored in the CMS. Add one row per destination; several can run for one form. Storage always happens regardless.
>
> **FormFormActionsItem**
>
> **actionType** `ActionType`
>
> **Always sent.** Action. One of `webhook`, `emailNotify`; a newer site may send others, so keep a fallback.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **enabled** `boolean`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Enabled.
>
> **destination** `readonly Readonly\<Record\<string, unknown\>\>[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. Where each submission is sent (⌘K → Webhook Destinations). It is signed with that destination’s secret, retried if the receiver is down, and listed on its Deliveries tab. The related `webhook-destination` documents, in order (empty when none). To set it, send a list of `{ "_id": "…" }`, one per document (one at most); a document the site can’t find is left out. At most 1 items.
>
> **notifyEmail** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. Where a copy of each submission is emailed (sent through Connections → Email). Replying answers the visitor. When set, an email address; empty or null when not.
>
> **fields** `Readonly\<Record\<string, unknown\>\>`
>
> **Always there:** `{}` when there are none. Any keys the site sent that aren’t listed above (such as one added after this SDK was built), by their wire names, as sent. Pass this model to a write and they are sent too.
>
> **archived** `boolean | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. In the archive: kept, but out of every list and off the site until it is restored. `false` (or null) for a live document.
>
> **aposShareKey** `string | null`
>
> **Sometimes sent:** `undefined` when the site leaves it out, and it can be `null`. The draft’s preview share key, while its share link is on: the link is the draft’s `_url` with `aposShareKey` and `aposShareId` (the draft’s `_id`) in its query. Absent otherwise, and on published documents.
>
> **pages** `number`
>
> **Always sent.** Pages in the whole list (0 when it is empty).
>
> **currentPage** `number`
>
> **Always sent.** This page, from 1.

> [accordion] Errors
>
> Nothing to catch: the SDK retries what is safe, and throws the rest as the classes below. Your exception handler turns them into your app’s own answers, once for every call (see [Map SDK errors to responses](https://docs.fetchski-attract.com/adonisjs/calling-the-api.md#map-sdk-errors-to-responses)); catch only what you want to react to here.
>
> **ValidationFailed** `400`
>
> The site refused what was sent: `errors` lists each field’s problem, `siteMessage` the first.
>
> **Retried first:** No. **Read:** `errors` (field → messages), `siteMessage`.
>
> **AuthenticationFailed** `401`
>
> The API key is missing or refused (malformed, revoked, expired), or a signature its signing mode needs is missing or stale.
>
> **Retried first:** No. **Read:** `siteMessage`, `errorName`, `data`.
>
> **Forbidden** `403`
>
> The key may not do this: a scope it lacks, or an address outside its allowlist. `siteMessage` names it.
>
> **Retried first:** No. **Read:** `siteMessage`, `errorName`, `data`.
>
> **NotFound** `404`
>
> Nothing matches, or the caller may not see it.
>
> **Retried first:** No. **Read:** `siteMessage`, `errorName`, `data`.
>
> **SiteError** `500`
>
> The site failed. Its logs say why.
>
> **Retried first:** No (only a 502, 503 or 504 is retried). **Read:** `siteMessage`, `errorName`, `data`.
>
> **SiteUnreachable** `no answer`
>
> No answer: DNS, a refused connection, TLS, or the timeout (15 s per attempt by default).
>
> **Retried first:** Yes, after 0.5 s then 1 s. **Read:** `reason`, `neverConnected`.
>
> **RequestNotSent** `not sent`
>
> The client refused to send it (e.g. a path segment of `..`); the site never saw it.
>
> **Retried first:** No. **Read:** `reason` (what to change).
>
> **SiteRequestFailed** `any other`
>
> Any other status, or a success whose JSON doesn’t match this SDK version’s types (update the SDK).
>
> **Retried first:** No. **Read:** `reason`, `status`.
>
> **UnknownSite** `setup`
>
> `sites.forSite('acme')` named a slug `config/attract.ts` doesn’t list (with the keys in the database: no row in `attract_api_keys`).
>
> **Retried first:** No: nothing was sent. **Read:** `message`, `slug`.
>
> **SiteConfigurationError** `setup`
>
> The site’s entry is wrong: a malformed `baseUrl` or key, a key filed under another slug, or no default site. `node ace attract:check` names the fix.
>
> **Retried first:** No: nothing was sent. **Read:** `message` (what to fix).

## Behavior

* **Access:** an API key with `content:forms:read` (or a master above it: `content:forms:all`, `content:all`, `admin:all`) reads the published documents; drafts (`aposMode=draft`) need `content:forms:write` (or a master above it). A signed-in person may call it as far as their own permissions allow; anyone else gets 404.
* **Rate limit:** the key’s own reads-per-minute limit, set when the key is created (default 600); over it, 429 with `Retry-After`. The client waits and retries for you; you see `RateLimited` only if that runs out.
* **Retries:** a read is safe to repeat: the client retries it on no answer, a 502/503/504 and a 429.
* **Timeout:** 15 s per attempt by default; raise `timeout` (milliseconds) in `config/attract.ts` for longer.
* **Paging:** one page per call. To walk them all, use `listFormsAll()` (see More examples): it asks for the next page as you iterate, and stops after page `pages`.

## More examples

`listFormsAll()` takes `listForms()`’s arguments except `page`. `listFormsPick()` takes the same arguments except `page`, after the fields to answer: each row is the document’s `id` and those fields.

```ts Every page wrap theme={"dark"}
import app from '@adonisjs/core/services/app'
import { SiteClient } from '@fetchski/attract-cms-sdk'

const site = await app.container.make(SiteClient)
for await (const form of site.forms().listFormsAll()) {
  console.log(form) // the next page is fetched as you iterate
}
```

```ts Only some fields wrap theme={"dark"}
import app from '@adonisjs/core/services/app'
import { SiteClient } from '@fetchski/attract-cms-sdk'

const site = await app.container.make(SiteClient)
const rows = await site.forms().listFormsPick(['title', 'slug']) // [{ id, title, slug }, …]: every form, across every page
```

## Test it

It calls the controller above with the SDK faked: `fakeAttract()` puts the fake in the container for this one test, and it answers every call with a valid example, so nothing leaves your machine and no key is read. Save it as `tests/unit/forms_list_forms.spec.ts`, then run your tests:

```ts tests/unit/forms_list_forms.spec.ts theme={"dark"}
import { test } from '@japa/runner'
import app from '@adonisjs/core/services/app'
import { fakeAttract } from '@fetchski/attract-cms-adonis/testing'
import ListFormsController from '#controllers/list_forms_controller'

test('forms.listForms', async () => {
  const site = fakeAttract()

  const controller = await app.container.make(ListFormsController)
  await controller.handle()

  site.assertCalled('forms.listForms')
})
```

```bash Terminal theme={"dark"}
node ace test
```

**Answer with your own values:** fake `forms.listForms` with a `sequence()` of pages, each `factories.FormList({...})`, and walk `listFormsAll()`.

```ts tests/unit/forms_list_forms_answers.spec.ts theme={"dark"}
import { test } from '@japa/runner'
import { factories, fakeAttract, sequence } from '@fetchski/attract-cms-adonis/testing'

test('forms.listForms answers your values', async ({ assert }) => {
  const site = fakeAttract({
    'forms.listForms': sequence(
      factories.FormList({ currentPage: 1, pages: 2 }),
      factories.FormList({ currentPage: 2, pages: 2 })
    ),
  })

  const walked: unknown[] = []
  for await (const form of site.forms().listFormsAll()) {
    walked.push(form)
  }
  assert.lengthOf(walked, 2)
})
```

To fake `listFormsAll()`, answer `forms.listForms` (the walk calls it page by page): a `sequence()` of answers for several pages.

## Related

> [card] [List a form’s locales](https://docs.fetchski-attract.com/adonisjs/reference/forms/get-form-locales.md)
>
> `site.forms().getFormLocales()`

> [card] [Create a form](https://docs.fetchski-attract.com/adonisjs/reference/forms/create-form.md)
>
> `site.forms().createForm()`

> [card] [Get a form](https://docs.fetchski-attract.com/adonisjs/reference/forms/get-form.md)
>
> `site.forms().getForm()`

> [card] [Replace a form](https://docs.fetchski-attract.com/adonisjs/reference/forms/replace-form.md)
>
> `site.forms().replaceForm()`

> [card] [Delete a form](https://docs.fetchski-attract.com/adonisjs/reference/forms/delete-form.md)
>
> `site.forms().deleteForm()`

> [card] [Update a form](https://docs.fetchski-attract.com/adonisjs/reference/forms/update-form.md)
>
> `site.forms().updateForm()`

> [card] [GET /@apostrophecms/form](https://docs.fetchski-attract.com/api-reference/forms/list-forms.md)
>
> The endpoint this calls, in the API reference: the HTTP request and answer, and every rule the site checks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.