PopClip JavaScript API Reference
    Preparing search index...

    Interface MultipleOption

    A multiple-choice option.

    interface MultipleOption {
        allowNone?: boolean;
        allowOther?: boolean;
        defaultValue?: string;
        description?: LocalizableString;
        hidden?: boolean;
        identifier: string;
        inset?: boolean;
        label?: LocalizableString;
        type: "multiple";
        valueLabels?: readonly LocalizableString[];
        values?: readonly string[];
    }

    Hierarchy (View Summary)

    Index
    allowNone?: boolean

    If true, the option UI offers a "None" row in addition to the defined values, whose value is the empty string. An option with allowNone and no defaultValue defaults to None rather than to the first value.

    allowOther?: boolean

    If true, the UI offers an "Other…" row in addition to the defined values, allowing the user to type a value of their own.

    defaultValue?: string

    The default value of the option. If omitted, multiple options default to None if allowNone is set, or else the first item in the list.

    description?: LocalizableString

    An optional longer explanation of this option, to be shown in the UI.

    hidden?: boolean

    If true, this option will be hidden in the prefs window. Default is false.

    identifier: string

    An identifying string for this option.

    inset?: boolean

    If true, this option will be inset to the right of its label, instead of below it. Default is false.

    A short label for this option.

    type: "multiple"

    The kind of option, one of:

    • string: a text box for free text entry,
    • boolean: a check box,
    • multiple: multiple-choice drop-down with predefined options,
    • secret: concealed text entry field (persisted in user's keychain),
    • password: concealed text entry field (not persisted, only passed to auth function),
    • heading: adds a heading in the user interface, but does not actually define an option
    valueLabels?: readonly LocalizableString[]

    Display names corresponding to the entries in the values array. These are shown in the option UI. If omitted, the raw value strings are shown instead.

    values?: readonly string[]

    The possible values for a multiple option.