Form

A form as seen by its owner, including lifecycle status and ownership timestamps.

  • createdAt
    Type: string
    required

    ISO 8601 timestamp of when the form was created.

  • description
    Type: string | null
    required

    The form’s description, or null if none was set.

  • fields
    Type: array · Field[] …100
    required

    Ordered list of a form’s fields (max 100). Field keys must be unique within the form. The order here is the order fields render on the public page.

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

  • id
    Type: string
    required

    Unique form identifier (prefixed frm_).

  • slug
    Type: string | null
    required

    The form’s slug, or null if none was set.

  • status
    Type: string enum
    required

    Lifecycle state. draft forms are private (not publicly viewable or submittable); published forms accept public submissions; closed forms are viewable but reject new submissions.

    values
    • draft
    • published
    • closed
  • title
    Type: string
    min length:  
    1
    max length:  
    200
    required

    Form title, shown as the heading on the public form page.

  • updatedAt
    Type: string
    required

    ISO 8601 timestamp of the form’s last modification.