> ## 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.

# Copy a form to another locale

> Copies the draft into another locale as a draft there.

```ts TypeScript wrap theme={"dark"}
import { createSiteClient } from '@fetchski/attract-cms-sdk';

const site = createSiteClient();
const form = await site.forms().localizeForm({ id: 'clx8m2k4p0000a1b2c3d4e5f6', toLocale: 'en' });
```

```json 200 wrap theme={"dark"}
{
  "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": {
          "slots": {
            "key": "Example value"
          },
          "css": "Example css",
          "mark": "Example mark"
        },
        "fields": {
          "metaType": "area",
          "_id": "clx8m2k4p0000a1b2c3d4e5f6",
          "items": [
            {}
          ]
        }
      }
    ]
  },
  "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": {
          "slots": {
            "key": "Example value"
          },
          "css": "Example css",
          "mark": "Example mark"
        }
      }
    ]
  },
  "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"
}
```

## In your app

A function makes the call on the client it is given, so your code passes the real one and a test passes a fake.

**1. Add the function**

```ts src/attract/localize-form.ts theme={"dark"}
import type { SiteClient } from '@fetchski/attract-cms-sdk';

export async function localizeForm(site: SiteClient, id: string) {
  return site.forms().localizeForm({ id, toLocale: 'en' });
}
```

The other values are the example’s: take yours from the request, a form or your database.

**2. Call it**

A script makes the client once and calls the function:

```ts scripts/localize-form.ts theme={"dark"}
import { createSiteClient } from '@fetchski/attract-cms-sdk';
import { localizeForm } from '../src/attract/localize-form.ts';

const site = createSiteClient();
console.log(await localizeForm(site, 'clx8m2k4p0000a1b2c3d4e5f6'));
```

```bash Terminal theme={"dark"}
node --env-file=.env scripts/localize-form.ts
```

A route handler, a job or a queue worker calls it the same way.

Answers that copy. 409 `conflict` when one exists and `update` is not true.

## Find the id

`id` is the document’s `_id`, from a list. Ask the list for only the fields you need: each row is a document’s `id` and those fields.

```ts TypeScript wrap theme={"dark"}
import { createSiteClient } from '@fetchski/attract-cms-sdk';

const site = createSiteClient();
const row = (await site.forms().listFormsPick(['title', 'slug'])).find((each) => each.slug === 'getting-started'); // { id, title, slug }, or undefined
```

Pass `row.id` as `id`. Drafts: list with `{ aposMode: 'draft' }` to get the draft’s id ([Find an id](https://docs.fetchski-attract.com/find-an-id.md)).

> [accordion] Required parameters
>
> One object, e.g. `localizeForm({ id })`; leave out the optional fields.
>
> **id** `string` *required*
>
> **Required.** The document’s `_id`: a full id names its own locale and mode (the draft’s `…:en:draft`, the published one’s `…:en:published`; no `aposMode` needed), a bare `aposDocId` takes the request’s (`aposLocale`, `aposMode`).
>
> **toLocale** `string` *required*
>
> **Required.** The locale to copy it into: a configured locale, not the current one.

> [accordion] Optional parameters
>
> **update** `boolean | null | undefined`
>
> **Optional.** Leave it out (or pass `null`) and it isn’t sent: the site’s default applies. Overwrite the copy if one already exists there (default false: 409 `conflict` instead).

> [accordion] Returns
>
> A `Form`. Form content type. Read its properties (`form.title`): 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`).
>
> **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.
>
> **FormSelectFieldWidgetChoicesItem**
>
> **label** `string`
>
> **Always sent.** The readable label displayed to users.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **value** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The value saved (as text) in the database. If not entered, the label will be used.
>
> **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.
>
> **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.
>
> **FormRadioFieldWidgetChoicesItem**
>
> **label** `string`
>
> **Always sent.** The readable label displayed to users.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **value** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The value saved (as text) in the database. If not entered, the label will be used.
>
> **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.
>
> **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.
>
> **FormCheckboxesFieldWidgetChoicesItem**
>
> **label** `string`
>
> **Always sent.** The readable label displayed to users.
>
> **id** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The row’s id, unique in its array.
>
> **value** `string`
>
> **Sometimes sent:** `undefined` when the site leaves it out. The value saved (as text) in the database. If not entered, the label will be used.
>
> **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.
>
> **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.
>
> **FormConditionalContentsArea**
>
> **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 FormConditionalContentsAreaItem[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `FormConditionalContentsAreaItem`. 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 `FormConditionalContentsAreaItem` 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.
>
> **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.
>
> **FormGroupContentsArea**
>
> **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 FormGroupContentsAreaItem[]`
>
> **Sometimes sent:** `undefined` when the site leaves it out. A list of `FormGroupContentsAreaItem`. 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 `FormGroupContentsAreaItem` 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.
>
> **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.

> [accordion] Errors
>
> Nothing to catch: the SDK retries what is safe, and throws the rest as the classes below; catch only what you want to react to (see [Errors and testing](https://docs.fetchski-attract.com/typescript/errors.md)).
>
> **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`.
>
> **Conflict** `409`
>
> A copy already exists in that locale: send `update: true` to overwrite it.
>
> **Retried first:** No. **Read:** `siteMessage`, `errorName`, `data`.
>
> **SiteError** `500`
>
> The site failed. Its logs say why.
>
> **Retried first:** No: a write may have landed. **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:** Only when nothing reached the site (`neverConnected()`); never after a timeout, when it may have landed. **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 your sites (`createSiteClients()`) don’t have.
>
> **Retried first:** No: nothing was sent. **Read:** `message`, `slug`.
>
> **SiteConfigurationError** `setup`
>
> The client’s settings are wrong: no `FETCHSKI_ATTRACT_URL` (or `baseUrl`), or a malformed API key.
>
> **Retried first:** No: nothing was sent. **Read:** `message` (what to fix).

## Behavior

* **Access:** an API key with `content:forms:write` (or a master above it: `content:forms:all`, `content:all`, `admin:all`). A signed-in person may call it as far as their own permissions allow; anyone else gets 403.
* **Rate limit:** the key’s own writes-per-minute limit, set when the key is created (default 120); over it, 429 with `Retry-After`. The client waits and retries for you; you see `RateLimited` only if that runs out.
* **Retries:** a write is sent again only after a 429 (refused before it acted) or when it never reached the site. After a timeout or a 5xx it may have landed: check before you send it again.
* **Timeout:** 15 s per attempt by default; raise `timeout` (milliseconds) on the client for longer.

## Test it

It calls the function above with a fake client: the fake answers every call with a valid example, so nothing leaves your machine and no settings or key are needed. Run it with `node --test`.

```ts tests/forms-localizeForm.test.ts theme={"dark"}
import { test } from 'node:test';
import { fakeSite } from '@fetchski/attract-cms-sdk/testing';
import { localizeForm } from '../src/attract/localize-form.ts';

test('forms.localizeForm', async () => {
  const site = fakeSite();
  await localizeForm(site, 'clx8m2k4p0000a1b2c3d4e5f6');
  site.assertCalled('forms.localizeForm', (args) => args.id === 'clx8m2k4p0000a1b2c3d4e5f6');
});
```

**Answer with your own values:** fake `forms.localizeForm` with `factories.Form({...})`, the fields you give over a valid example.

```ts tests/forms-localizeForm-answer.test.ts theme={"dark"}
import assert from 'node:assert/strict';
import { test } from 'node:test';
import { factories, fakeSite } from '@fetchski/attract-cms-sdk/testing';

test('forms.localizeForm answers your values', async () => {
  const site = fakeSite({
    'forms.localizeForm': factories.Form({ title: 'Your value' })
  });
  const form = await site.forms().localizeForm({ id: 'clx8m2k4p0000a1b2c3d4e5f6', toLocale: 'en' });
  assert.equal(form.title, 'Your value');
});
```

## Related

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

> [card] [List forms](https://docs.fetchski-attract.com/typescript/reference/forms/list-forms.md)
>
> `site.forms().listForms()`

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

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

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

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

> [card] [POST /@apostrophecms/form/\{\_id}/localize](https://docs.fetchski-attract.com/api-reference/forms/copy-a-form-to-another-locale.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.