Related services: FormsService —
lynkow.forms.getBySlug(),lynkow.forms.submit()
Form
Interface
A public form available for submission.
Returned by GET /public/{siteId}/forms/{slug} and unwrapped from the
{ data } envelope by forms.getBySlug().
Use schema.fields to dynamically render the form fields, schema.settings
to configure the submit button and post-submission behavior, and the spam
protection flags to set up honeypot or reCAPTCHA if enabled.
Only forms with status: 'active' are returned by the public API.
Draft, closed, and archived forms are never returned.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Optional form description, displayed above the form fields.<br> |
|
| Yes | Whether honeypot spam protection is enabled for this form.<br><br>When |
|
| No | Unique form identifier (UUID v4). |
|
| Yes | BCP 47 locale code of this form (e.g. |
|
| No | Form display name (e.g. |
|
| Yes | Whether Google reCAPTCHA v3 is enabled for this form.<br><br>When |
|
| Yes | Google reCAPTCHA v3 public site key, needed to render the reCAPTCHA widget.<br>Only present when |
|
| No | Schema describing the form's fields, layout, behavior settings, and<br>conditional logic. Iterate |
|
| No | URL-friendly slug, unique within the site.<br>Lowercase, hyphenated (e.g. |
|
| No | Form status. 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
A single field definition in a form schema. Describes the input type, label, validation, and layout for one form field.
Use these to dynamically render form fields in your frontend.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Per-field conditional logic. When present, the field is only rendered or<br>required based on the values of earlier fields. Conditions defined here<br>are scoped to this field; cross-field rules live in |
|
| Yes | Pre-filled default value for the field.<br>Type depends on the field type: |
|
| Yes | Help text displayed below the input to guide the user.<br>Max 500 characters. |
|
| No | Field identifier, used as the key in submission data.<br>Auto-generated by the admin (e.g. |
|
| No | Human-readable label displayed above or beside the input.<br>Max 255 characters. Always present. Use this as the |
|
| Yes | Selectable options for |
|
| Yes | Configuration for |
|
| Yes | Placeholder text shown inside the input when empty.<br>Max 255 characters. |
|
| Yes | Whether this field must be filled before submission.<br>When |
|
| No | HTML input type for this field.<br>Determines the rendered input element and applicable validation rules. |
|
| Yes | Validation rules applied to this field's value.<br> |
|
| Yes | Layout width hint for responsive form layouts:<br>- |
FormFieldOption
Interface
A selectable option for select, radio, and checkbox field types.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Human-readable label displayed to the user in the form UI.<br>May differ from |
|
| No | The value sent in the form submission data.<br>This is the machine-readable identifier stored in the database.<br>Must be unique within the field's options array. |
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
Supported input types for form fields.
Maps to standard HTML input types, with a few additions:
'textarea': multi-line text input (<textarea>)'select': dropdown menu (<select>); requiresoptions'radio': radio button group; requiresoptions'checkbox': checkbox or checkbox group; usesoptionsif present, otherwise single boolean'file': file upload input; accepts files via multipart form submission'rating': star/score rating input'hidden': hidden input; not displayed to users, useful for tracking parameters
type FormFieldType = "text" | "email" | "tel" | "url" | "textarea" | "number" | "date" | "datetime" | "time" | "select" | "radio" | "checkbox" | "file" | "rating" | "hidden"FormFieldValidation
Interface
Validation rules for a form field. Applied both client-side (for UX) and server-side (for security).
Which rules are relevant depends on the field type:
minLength/maxLength: text-based fields (text,email,textarea,url,tel)min/max:numberfields onlypattern: any text-based field; validated as a JavaScript RegExpaccept/maxSize:filefield only
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Accepted MIME types or extensions for |
|
| Yes | Maximum numeric value (inclusive).<br>Only applicable to |
|
| Yes | Maximum character length for text input.<br>Applicable to |
|
| Yes | Maximum file size in bytes for |
|
| Yes | Custom error message displayed when validation fails.<br> |
|
| Yes | Minimum numeric value (inclusive).<br>Only applicable to |
|
| Yes | Minimum character length for text input.<br>Applicable to |
|
| Yes | Regular expression pattern for custom validation (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
Form behavior settings nested under FormSchema.settings.
Controls submit button text, success message, redirect, and progress UI.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Message displayed when the form is closed (no longer accepting submissions).<br> |
|
| Yes | URL to redirect the user to after successful submission.<br>Must be a valid URL. When set, takes precedence over |
|
| Yes | Whether the form requires the visitor to be authenticated.<br>Enforced server-side. |
|
| Yes | Whether to render a progress bar for multi-page forms.<br> |
|
| Yes | Text displayed on the submit button (e.g. |
|
| Yes | Success message displayed after a successful submission.<br>Shown inline on the page. Ignored if |
FormSettings
TypeAlias
Backwards-compatible alias for FormSchemaSettings.
type FormSettings = FormSchemaSettingsFormSubmitData
TypeAlias
Data payload for submitting a form.
Keys correspond to FormField.id values from the form's schema.fields.
IDs are auto-generated by the admin (e.g. 'field_1764776796820'),
not human-readable names. Always derive the keys from the schema returned
by forms.getBySlug(); do not hard-code semantic names.
Value types depend on the field type:
Text fields (
text,email,textarea,url,tel):stringNumber fields (
number,rating):numberCheckbox (single):
booleanFile fields:
File(browser File object)Select/radio/checkbox (with options):
string(the selected option'svalue)
All fields marked as required: true in the schema must be present.
Omit optional fields or set them to empty string.
type FormSubmitData = Record<string, string | number | boolean | File>