Member Junction
    Preparing search index...

    A single question in a response form.

    Each question has an ID (used as the key in the response object), a label, a type (determines which input control to render), and optional validation/help text.

    interface FormQuestion {
        defaultValue?: any;
        helpText?: string;
        id: string;
        label: string;
        required?: boolean;
        type: FormQuestionType;
        widthHint?: "narrow" | "medium" | "wide" | "full" | "auto";
    }
    Index

    Properties

    defaultValue?: any

    Default value to pre-populate the input. Type should match the question type.

    helpText?: string

    Optional help text shown below the input. Use for clarification or examples (e.g., "Estimated annual revenue in USD").

    id: string

    Unique identifier for this question within the form. Used as the key in the response object returned to the agent.

    label: string

    Label text displayed to the user. Should be clear and concise (e.g., "Company Name", "Industry").

    required?: boolean

    Whether this question must be answered. Default: false

    Question type configuration. Determines which input control is rendered and validation rules.

    widthHint?: "narrow" | "medium" | "wide" | "full" | "auto"

    Optional width hint for the input field. Controls the visual width of the input control:

    • 'narrow': ~150-200px (numbers, dates, times, short codes)
    • 'medium': ~250-350px (names, cities, phone numbers)
    • 'wide': ~400-500px (email, URLs, button groups, radio, checkbox)
    • 'full': 100% width (textarea, search fields)
    • 'auto': Auto-size based on content (dropdowns)

    Default behavior (if not specified):

    • textarea: 'full'
    • number/currency/date/time: 'narrow'
    • buttongroup/radio/checkbox: 'wide' (with wrapping)
    • dropdown: 'auto'
    • email: 'wide'
    • text: 'medium'