Field

  • A single form field. The type discriminator selects which extra constraint props are valid, e.g. options for select/multiselect/radio, min/max for number/date, minLength/maxLength for text/textarea.

    A single form field. The type discriminator selects which extra constraint props are valid, e.g. options for select/multiselect/radio, min/max for number/date, minLength/maxLength for text/textarea.

    • key
      Type: string
      min length:  
      1
      max length:  
      64
      Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
      required

      Stable machine name for the field. Used verbatim as the property name in a submission body, so it must start with a letter and contain only letters, digits, and underscores. Unique within a form and safe to keep constant across edits.

    • label
      Type: string
      min length:  
      1
      max length:  
      200
      required

      Human-readable label rendered above the input on the public form page.

    • type
      enum
      const:  
      text
      required

      Single-line free text input.

      values
      • text
    • description
      Type: string
      max length:  
      1000

      Optional helper text shown beneath the input to guide the respondent.

    • maxLength
      Type: integer
      greater than:  
      0

      Maximum number of characters allowed.

    • minLength
      Type: integer
      min:  
      0

      Minimum number of characters allowed.

    • pattern
      Type: string
      max length:  
      500

      Optional JavaScript-flavoured regular expression the value must match in full.

    • placeholder
      Type: string
      max length:  
      200

      Optional placeholder text shown inside an empty input.

    • required
      Type: boolean

      Whether a value must be supplied. Required fields are re-validated server-side on every submission regardless of client-side checks.