Multi-Select
Prompt operator with multiple selection from dropdown list.
You can create a multi-select with multiselect:
ui:
components:
- key: test_interfaces
type: multiselect
label: "Test Interfaces"
description: "Select all interfaces to test"
required: true
options:
- label: "USB"
value: "usb"
- label: "Ethernet"
value: "ethernet"Properties
Display
You can configure how the multi-select appears to the operator.
| Property | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Unique identifier for accessing the value |
type | string | Yes | Must be "multiselect" |
label | string | No | Display label for the multi-select |
description | string | No | Helper text displayed below the multi-select |
Value
You can set default values and bind to measurements or unit properties.
| Property | Type | Required | Description |
|---|---|---|---|
default_value | array | No | Array of default selected option values |
bind | string | No | Bind to unit property or measurement. See Collect Input for details. |
Options
You can define the list of choices available for selection.
| Property | Type | Required | Description |
|---|---|---|---|
options | array | Yes | Array of objects with label and value properties |
Each option object has:
| Property | Type | Description |
|---|---|---|
label | string | Text displayed to the operator |
value | string | Value submitted when selected |
Validation
You can validate selection before the value is submitted.
| Property | Type | Required | Description |
|---|---|---|---|
required | boolean | No | If true, operator must select at least one option (shows "Required" badge) |
TofuPilot validates operator input before submission, preventing continuation until all constraints are met. For some workflows, this input validation can create workarounds where operators bypass the UI to proceed.
Instead, you can capture the input as a Measurement using Binding and validate it with Validators. TofuPilot will record the actual operator input while enforcing pass/fail criteria.
Examples
Equipment Selection
We'll let operators select required equipment from a large list:
phases:
- name: Verify Equipment
ui:
components:
- key: required_equipment
type: multiselect
label: "Required Equipment"
description: "Select all equipment needed"
required: true
options:
- label: "Multimeter"
value: "multimeter"
- label: "Oscilloscope"
value: "oscilloscope"
- label: "Power Supply"
value: "power_supply"
- label: "Signal Generator"
value: "signal_gen"
- label: "Load Bank"
value: "load_bank"
- label: "Thermal Camera"
value: "thermal_cam"Feature Flags
We'll allow operators to enable optional test features:
phases:
- name: Configure Test Features
ui:
components:
- key: enabled_features
type: multiselect
label: "Enable Features"
required: false
options:
- label: "Advanced Logging"
value: "logging"
- label: "Performance Metrics"
value: "metrics"
- label: "Video Recording"
value: "video"
- label: "Auto-retry on Failure"
value: "auto_retry"
- label: "Email Notifications"
value: "email"How is this guide?