Interface DraftField

interface DraftField {
    dropdown?: boolean;
    dynamicOptions?: boolean;
    helperText?: string;
    inputType?: DraftInputType;
    kind?: "input";
    label: string;
    maxChars?: number;
    maxFiles?: number;
    maxFileSizeKb?: number;
    maxSelected?: number;
    minChars?: number;
    minFiles?: number;
    minSelected?: number;
    multi?: boolean;
    name: string;
    options?: DraftFieldOption[];
    pattern?: string;
    range?: boolean;
    refreshOnSelect?: boolean;
    required?: boolean;
    type: DraftFieldType;
    visibleWhen?: VisibleCondition;
}

Properties

dropdown?: boolean

Choice fields: render as a Dropdown instead of an inline radio group.

dynamicOptions?: boolean

Choice fields: options supplied by the data-exchange endpoint at runtime.

helperText?: string

Grey hint rendered beneath the field (WhatsApp helper-text).

inputType?: DraftInputType

Text fields only: on-device keyboard + client-side validation.

kind?: "input"

Discriminator. Optional/"input" = a data field; "display" = a DisplayItem.

label: string
maxChars?: number
maxFiles?: number
maxFileSizeKb?: number
maxSelected?: number
minChars?: number

TextInput min/max character count; TextArea uses maxChars as max-length.

minFiles?: number

Media fields (photo/document): upload count + size bounds.

minSelected?: number

Multi-select choice: min/max items the user must pick.

multi?: boolean

Choice fields: render as a multi-select CheckboxGroup. Value is an array.

name: string
options?: DraftFieldOption[]

Choice fields: static options. Mutually exclusive with dynamicOptions.

pattern?: string

TextInput regex (Meta v6.2+). Only emitted when helperText is also set.

range?: boolean

Date fields only: render as a CalendarPicker range. Value is {start_date,end_date}.

refreshOnSelect?: boolean

Choice fields (dynamic): selecting re-calls the endpoint so dependent fields on the SAME screen can refresh — i.e. cascading dropdowns.

required?: boolean
visibleWhen?: VisibleCondition

Show this field only when a prior same-screen answer matches.