> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# runFormStep()

> Function exported by @botmesh/core/spi.

```ts theme={null}
function runFormStep(
   def, 
   ctx, 
   c, 
   opts?, 
   flowTimeoutMs?
): Promise<FormValues>;
```

Defined in: [forms/runForm.ts:48](https://github.com/andresayac/botmesh/blob/main/packages/core/src/forms/runForm.ts#L48)

Run a form step and store its answers (`c.state[opts.stateKey ?? def.id]`,
plus each field with `flatten`). Resolves with the answers.

## Parameters

| Parameter | Type |
| - | - |
| `def` | [`FormDefinition`](https://botmesh.afaya.com.co/api/core/interfaces/FormDefinition) |
| `ctx` | [`RuntimeMessage`](https://botmesh.afaya.com.co/api/core/interfaces/RuntimeMessage) |
| `c` | [`ConversationControls`](https://botmesh.afaya.com.co/api/core/interfaces/ConversationControls) |
| `opts?` | [`FormStepOptions`](https://botmesh.afaya.com.co/api/core/interfaces/FormStepOptions) |
| `flowTimeoutMs?` | `number` |

## Returns

`Promise`\<[`FormValues`](https://botmesh.afaya.com.co/api/core/type-aliases/FormValues)>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.