Wait for form event
Wait until the person presses a button, changes a field, submits or closes the open form; then react to it (e.g. in an If on the event and element).
Command in the Interactive forms toolkit · id ooa.forms/wait_for_event · 4 inputs (1 required), 5 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Name | String | Yes | Name of the open form (by default the form's id, as given when it was displayed). | |
| Events | String | No | any | Which events to wait for (closing the form always ends the wait). |
| Timeout (seconds) | Number | No | 300 | How long to wait. |
| Fail on timeout | Boolean | No | false | Stop with FORMS.TIMEOUT when nothing happened in time (otherwise timed_out is true). |
Outputs
| Output | Type | What it is |
|---|---|---|
| event | String | button, change, submit, close or timeout. |
| element | String | Id of the button pressed or the field changed; empty for submit, close and timeout. |
| value | Any | The changed field's new value. |
| values | Dictionary | All answers by field id. |
| timed_out | Boolean | True when nothing happened in time. |