Docs

Built-in tools›Preview

Fill input

preview_fill
Group
Preview
Turned on by
Its own switch on the Tools page of Conversation settings.
Approval
Reviewed: writes and open-ended actions ask for approval unless the security level or an earlier “Always allow” covers them.
Profile key
tool.preview_fill.description

Fills an input, textarea, select or editable element on the conversation's preview page, found by a CSS selector or its snapshot uid.

An empty string clears the field. A select picks the option whose value or visible text matches, and the call fails if none does.

When it asks you

Asks at Manual and Accept edits; Always allow is not offered. If you have been using the page yourself, you hand it back first in the pane; on a signed-in page, that takeover needs your approval at every security level. See Browser and preview.

Good to know

  • The value is set in one step and input and change events fire, which React-controlled fields accept. No keys are pressed, so handlers that listen for key presses do not run; for key events the model uses preview_eval.

Parameters

ParameterTypeDetails
value required
Value
stringValue to fill
selector
CSS selector
stringCSS selector for the input element. Give this or uid.
serverId
Server ID
stringServer ID
uid
Element uid
integerThe uid preview_snapshot printed for the input element, the number in brackets at the start of its line. Give this or selector.

Edit this page on GitHub