Related services: FormsService:
lynkow.forms.getBySlug(),lynkow.forms.submit()
Form
Interface
An active form, as forms.getBySlug() returns it. Render schema.fields,
wire the submit button from schema.settings, and read the verification
policy before submitting.
With a request locale, it also carries requestedLocale and isFallback
from LocaleResolution: isFallback is true when the form is served
in another locale of the site.
Extends: LocaleResolution
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Introductory text to show above the fields. |
|
| Yes | Whether the form rejects a filled honeypot. |
|
| No | Form ID (UUID). |
|
| Yes |
|
|
| Yes | Locale of the served translation, e.g. |
|
| No | Display name, e.g. |
|
| Yes | Whether submitting needs a reCAPTCHA token, passed as |
|
| Yes | Public reCAPTCHA site key, to render the challenge or mint a v3 token. |
|
| Yes | reCAPTCHA version of the form. A v3 token needs action |
|
| Yes | BCP 47 locale code the request asked for (e.g. |
|
| No | Fields, pages, settings and conditional rules. See FormSchema. |
|
| No | Slug, unique per site and locale, e.g. |
|
| No | Always |
FormCondition
Interface
Conditional logic rule applied to a form field.
When the referenced field matches the operator/value combination, the
action is applied (show, hide, require, or skip to a target page).
Used for dynamic forms where some fields appear conditionally based on
earlier answers.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Effect applied when the condition matches:<br>- |
|
| No | The |
|
| No | Comparison operator applied to the referenced field's current value. |
|
| Yes | Target page index for |
|
| Yes | Value compared against the referenced field. Type depends on the field<br>type: string for text fields, number for number fields, boolean for<br>checkboxes. |
FormField
Interface
One field of a form schema: its input type, label, validation and layout. Render one input per field, in order.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Rules that show, hide or require this field from other fields' values.<br>Form-wide rules are in |
|
| Yes | Value to pre-fill, typed like the field's submitted value. |
|
| Yes | Help text to render below the input. At most 500 characters. |
|
| No | Field id, unique within the form, e.g. |
|
| No | Label to render with the input. At most 255 characters. |
|
| Yes | Choices for a |
|
| Yes | Country-code settings of a |
|
| Yes | Placeholder text for the empty input. At most 255 characters. |
|
| Yes | Whether the field needs a value. The API refuses an empty required field<br>with a 422. |
|
| No | Input type to render. See FormFieldType. |
|
| Yes | Validation rules beyond |
|
| Yes | Layout width: the full row, half of it or a third. |
FormFieldOption
Interface
A selectable option for select, radio, and checkbox field types.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The text to display for this option, e.g. |
|
| No | The value to submit when the visitor picks this option, e.g. |
FormFieldPhoneOptions
Interface
Phone field configuration.
Only relevant for fields of type 'tel'.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Default country code (e.g. |
|
| No | Whether the country-code selector is rendered next to the phone input. |
FormFieldType
TypeAlias
Input type of a form field. Most map to the HTML input type of the same name. The others:
'textarea': multi-line text input.'select'and'radio': one choice amongoptions.'checkbox': a group overoptions, or a single boolean without them.'file': upload the file yourself and submit its reference as a string.'rating': a numeric score.'hidden': not shown to the visitor, for example a tracking value.
type FormFieldType = "text" | "email" | "tel" | "textarea" | "number" | "date" | "datetime" | "time" | "select" | "radio" | "checkbox" | "file" | "rating" | "hidden"FormFieldValidation
Interface
Validation rules of a form field. The API checks minLength, maxLength,
min, max and pattern on submission and refuses a failing value with a
422. accept and maxSize are hints for your upload input.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Accepted file types for a |
|
| Yes | Maximum numeric value, inclusive. |
|
| Yes | Maximum length of a text value, in characters. |
|
| Yes | Maximum file size in bytes for a |
|
| Yes | Always |
|
| Yes | Minimum numeric value, inclusive. |
|
| Yes | Minimum length of a text value, in characters. |
|
| Yes | Regular expression the value must match, without delimiters, e.g. |
FormPage
Interface
Page definition for multi-page forms.
Multi-page forms split fields across pages, identified by fields (a list
of FormField.id values that belong to the page). Single-page forms have
no pages entry on the schema.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Page description displayed below the title.<br> |
|
| No | Ordered list of |
|
| Yes | Page title displayed at the top of the page.<br> |
FormSchema
Interface
Full schema describing a form's fields, layout, behavior, and conditional logic.
Returned as the schema property of Form by forms.getBySlug().
Render fields in order to build the form UI dynamically. Use settings
to wire the submit button and post-submission behavior. Use conditions
for cross-field rules (e.g. show field B when field A equals X).
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Cross-field conditional logic rules. Each rule references a field by id,<br>compares its value, and applies an action (show/hide/require/skip). |
|
| No | Ordered array of field definitions that make up the form.<br>Render in order to build the form UI. |
|
| Yes | Page definitions for multi-page forms.<br> |
|
| No | Behavior settings (submit label, success message, redirect, progress bar). |
FormSchemaSettings
Interface
Behavior settings of a form, under FormSchema.settings: submit label,
success message, redirect and progress bar.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Message the API returns when the form stops accepting submissions, as the<br>error of |
|
| Yes | Absolute |
|
| Yes | Whether only a signed-in customer can submit. Without a session, |
|
| Yes | Whether to render a progress bar on a multi-page form. |
|
| Yes | Text for the submit button, e.g. |
|
| Yes | Message to show after a successful submission. |
FormSettings
TypeAlias
Backwards-compatible alias for FormSchemaSettings.
type FormSettings = FormSchemaSettingsFormSubmitData
TypeAlias
The answers forms.submit() sends, keyed by FormField.id from
forms.getBySlug(). Field ids are generated, e.g. 'field_1764776796820'.
Send a number for number and rating fields, a boolean for a single
checkbox, the option value for a choice, and a string otherwise. A
checkbox or select field also takes an array of option values, and a
tel field a { countryCode, number } object. null counts as empty. For a
file field, upload the file first and send its reference: a File object
would arrive empty. Every required field needs a value. Keys the schema
does not declare are dropped.
type FormSubmitData = Record<string, string | number | boolean | null | string | number | boolean | null[] | { countryCode: string; number: string | number }>