Skip to main content

run

Run a form with the given runnables or a single widget.

This is the main entry point for executing forms. It supports two modes:

  1. Running a list of runnables as a multi-step form
  2. Running a single widget to get its value

Examples:

Running a single-step form:

from abstra_internals.interface.sdk.forms import run
from abstra_internals.interface.sdk.forms.widgets import InputWidget
from abstra_internals.interface.sdk.forms.widgets import TextInput
run([[
TextInput(label="Enter your name"),
TextInput(label="Enter your email")
]])

Running a multi-step form:

from abstra_internals.interface.sdk.forms import run
from abstra_internals.interface.sdk.forms.widgets import InputWidget
from abstra_internals.interface.sdk.forms.widgets import TextInput
run([
[TextInput(label="Enter your name")],
[TextInput(label="Enter your email")]
])

## Parameters

| Name | Description | Type | Default |
| ---- | ----------- | ---- | ------- |
| **runnables (required)** | Either a list of form steps or a single widget. | Union[Sequence[Runnable], Widget] | None |
| state | Initial state values for the form. | Dict | None |
| hide_steps | Whether to hide steps navigation in the UI. | bool | False |



## Return Value

`Union[abstra_internals.entities.forms.form_state.State, NoneType, object]`