Skip to main content
Every field in a Declarative Forms config shares the same base properties. This page covers all of them. Type-specific properties (like options for selection fields or otp for email) are covered in the individual reference pages.

id

Unique identifier within the form. No spaces — use snake_case by convention. The id becomes the key in submission.data and is used in visible_when expressions and next conditional rules.
- id: full_name
  type: short_text
  label: Full name

type

The field type. Required. Determines how the field renders and what value it produces.
TypeDescriptionReference
short_textSingle-line text inputshort_text
long_textMulti-line textarealong_text
emailEmail address input with format validation
numberInteger value
urlURL input
mobile_numberPhone/mobile number input
dateDate picker
dropdownSingle selection from a collapsible listdropdown
single_selectRadio-button style single selectionsingle_select
multiple_selectCheckbox-style multi-selectionmultiple_select
ratingNumeric rating scale
addressFull address with Google Places autocomplete
address_localityCity/locality autocomplete
address_regionState/region autocomplete
address_countryCountry autocomplete
file_uploadFile attachment (up to 10 MB)
signatureHTML5 canvas signature
hiddenNot shown; populated via URL prefill

label

The label shown above the input. Required. Accepts a plain string or a LocaleMap.
label: Full name
label:
  en: Full name
  es: Nombre completo

placeholder

Text shown inside the input when it is empty. Optional. Accepts a plain string or a LocaleMap.
placeholder: Jane Smith

visible_when

A JavaScript expression evaluated against data — the object containing all field values submitted so far. The field is shown when the expression is truthy. Hidden fields are excluded from submission data.
- id: email
  type: email
  label: Email address
  visible_when: "data.role !== undefined"
This shows the email field only after role has been selected. Use any JS expression that evaluates to a boolean — comparisons, logical operators, and string methods all work.

validators

An array of validation rules applied client-side before the section is submitted. Rules run in order; all must pass.

required

Field must not be empty.
validators:
  - required
Default error message: This field is required.

type: pattern

Input must match a regular expression.
validators:
  - type: pattern
    regex: "^[A-Za-z ]+$"
    message: Please enter letters only.
PropertyTypeRequiredDescription
regexstringYesRegular expression to match against.
messagestring | LocaleMapNoError shown when the pattern does not match.

type: min

Minimum value. Meaning depends on field type:
  • short_text, long_text — minimum character count
  • number — minimum numeric value
  • date — minimum date (ISO 8601)
  • multiple_select — minimum number of selections
validators:
  - type: min
    value: 2
    message: Full name must be at least 2 characters.
PropertyTypeRequiredDescription
valuenumber | stringYesMinimum value.
messagestring | LocaleMapNoError shown when the input falls below the minimum.

type: max

Maximum value. Same type-specific semantics as min.
validators:
  - type: max
    value: 100
    message: Full name must be 100 characters or fewer.
PropertyTypeRequiredDescription
valuenumber | stringYesMaximum value.
messagestring | LocaleMapNoError shown when the input exceeds the maximum.

Full example

The full_name field from the job application form with all validators applied:
- id: full_name
  type: short_text
  label: Full name
  placeholder: Jane Smith
  validators:
    - required
    - type: min
      value: 2
      message: Full name must be at least 2 characters.
    - type: max
      value: 100
      message: Full name must be 100 characters or fewer.
    - type: pattern
      regex: "^[A-Za-z .'-]+$"
      message: Please use letters and standard punctuation only.
All validators are client-side only. The API does not re-validate values on receipt. Implement server-side validation in your webhook receiver if needed.