Skip to main content
Category: Controls · Sends commands: via triggers/scripts · Emits a value: yes (to scripts)

Mental model

A Text Input is a form field. It captures what the user types (or picks, or scans) and hands that value to your logic. Think of it as the entry point for user-supplied data on a dashboard.

When to use it

  • Let a user enter a name, note, setpoint, or code
  • Offer a dropdown / checklist choice
  • Scan a QR value into a field

Settings

General

  • Widget Title / ID
  • Input type — text, select, checklist, etc.
  • Placeholder · default value
  • Max length · Pattern (regex) — validation
  • Select / Checklist options — one per line, for choice inputs
  • Enable QR scan — scan a code into the field
  • Show submit / clear button · submit label

Style

Background, border (color / width / radius), text color, font size, input height, padding.

Triggers

EventFires when
inputEach keystroke
changeValue changed (on blur / commit)
submitThe submit button is pressed
clearCleared
focus / blurField focus changes
keydown / keyup / keypressKey events
(common)load, ready, destroy, update, visible, hidden

Using the entered value

A Text Input does not auto-inject its value into a trigger’s command params (only Slider, Color Picker, and Form do). To act on the typed value, use the Script API — the event carries the value.
// change fires with the raw value; submit fires with { value }
widget.on('nameInput', 'change', (value) => {
  widget.setText('preview', 'Entered: ' + value);
});

widget.on('nameInput', 'submit', (data) => {
  ws.send(context.deviceId, { command: 'setName', name: data.value });
});
Or drop the input inside a Form — a Form does auto-inject its fields on submit, so you get the values in the command params for free.

Form

Multiple fields that auto-inject on submit.

Script API

React to the entered value.