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

# Collect and reuse form answers

> Collect a support topic with a Form component and use the answer in the next flow step.

Build a support form that collects a topic and issue description, then shows the selected topic in the next message.

## Before you start

Before you start, sign in to [the dashboard](https://dashboard.hellotars.com) and select the organization you want to work in.

* You need an agent with a flow you can edit. See [Create an agent](https://hellotars.com/docs/guides/building/create-an-agent.md).
* Use the [Form reference](https://hellotars.com/docs/guides/building/gambits/component.md#form) for field types, validation, protection, and result paths.

## Collect a support topic

**1. Create the form step**

Add a Component gambit, turn on **Workflow Mode**, and pick **Form**. Set the gambit's **Variable** to `intake`.

**2. Add two fields under Inputs**

In `fields`, add a required `select` field with `key` `topic` and `label` **Topic**. Add options with label **Billing** and value `billing`, and label **Technical help** and value `technical`.

Add a required `textarea` field with `key` `details` and `label` **Describe the issue**. Set `title` to **Support request** and `submitLabel` to **Send request**.

**3. Connect Submitted to a No Input gambit**

In the next gambit's message, enter `Your request is about {{api.intake.form.answer.topic}}.` Use the @ menu to insert the reference. Route **Skipped** and **Free text**, if enabled, separately because they do not contain submitted form answers.

**4. Save the gambits**

Save the Component and No Input gambits after configuring their inputs, message, and connection.

![The Support request Component gambit in Workflow Mode, with variable intake, Form selected, and title and submitLabel inputs filled in](https://hellotars.com/docs/docs/guides/building/images/form-inputs.png)

![The fields input of the Support request Component gambit, with Field 1 set to key topic, label Topic, type select, required on, and its first option, label Billing and value billing](https://hellotars.com/docs/docs/guides/building/images/form-fields.png)

![Field 2 of the fields input, with key details, label Describe the issue, type textarea, required on, and no options](https://hellotars.com/docs/docs/guides/building/images/form-fields-details.png)

![The Support request form in a test conversation, with Topic, Describe the issue, and Send request](https://hellotars.com/docs/docs/guides/building/images/form-preview.png)

## Use the answers

The submitted topic is available at `{{api.intake.form.answer.topic}}`, and the description at `{{api.intake.form.answer.details}}`. Use the topic in a condition to branch, or pass the answers into a later tool step. Read these paths only after the **Submitted** outcome.

## Verify

**1. Select Test and run the flow to the form**

The form shows **Topic** and **Describe the issue**.

**2. Submit with a required field empty**

Validation prevents submission until the required fields have answers.

**3. Choose Billing, enter sample details, and submit**

The next message reads **Your request is about billing.**

![The submitted support form, the support request confirmation, and the message Your request is about billing in a test conversation](https://hellotars.com/docs/docs/guides/building/images/form-submitted.png)

## Related pages

* [Component gambit](https://hellotars.com/docs/guides/building/gambits/component.md#form)
* [Flow control and branching](https://hellotars.com/docs/guides/building/flow-control-and-branching.md)
* [Use variables](https://hellotars.com/docs/guides/building/variables.md)


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