Browse the docs

Ask in the page

Shows a form over the page, waits for Submit, and returns the values.

Ask in the page

Details #

Like the prompt step, but inside the page and next to what you're looking at. fields is a list: a name, or {name, label, type, options, default, required, placeholder} with type text, textarea, number, checkbox, select or password. Or give html with your own inputs; the values come from the form.

The values come back as a dictionary, and go into into. Cancel (or Esc) fails the step with "cancelled", which an if can catch with onFailure.

Parameters #

ParameterTypeRequiredValuesWhat it does
browserone ofsafari chrome front
fieldslist of any valueThe questions. Or html.
htmltext
intotextThe variable that receives the dictionary.
sampleany value
tabany value
timeoutnumberSeconds to wait.
titletextA heading.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Ask for a note and show it
Do
  1. Ask in the page: “Note”
  2. Show “{{answers.note}}” for 2 s
Open in Switchboard to try it

Gotchas #

  • The form waits for a person, so the macro's own timeout is the limit.