# Text

Text questions are used to collect short or long-form free-text input from responders. Common use cases include gathering names, email addresses, or open-ended feedback.

Text question answers are stored as a `string` data type.

<figure><img src="/files/jqQUwoqsrW1o8Gq8Nv1z" alt=""><figcaption></figcaption></figure>

***

### Long-Text Input

By default, a text question shows a single-line input. To enable multiline responses:

* Select the question.
* Enable **Multiline?** in the settings panel.
* Specify the **minimum** and **maximum number of lines** for the input box.

To customize the dimensions of the input box further (e.g. to create a longer feedback box):

* Open the **Style** tab.
* Toggle **Override default text input style**.
* Apply your desired styling.

#### Limiting Answer Length

To control the length of a responder’s answer:

* Enable **Max length restriction?**
* Choose a limit by **characters** or **words**.

You can also enable **Show remaining count?** to display the number of characters or words remaining as the responder types.

***

### Formatting Input with Prefixes and Suffixes

To provide additional context and guide responders on the expected input, you can add:

* A **Prefix** (e.g. `$` or `@`)
* A **Suffix** (e.g. `USD` or `.com`)

These can be configured in the **Settings** menu under **Prefix?** and **Suffix?**.

***

### Allowing Multiple Answers

To allow a responder to submit more than one value for a single question:

* Enable **Allow multiple answers** in the settings.

Each new input will be treated as an individual item in an array of string values.

***

### Default Answer

Use the **Default answer** setting to prepopulate the text field with a preset value. This value can still be edited by the responder.

<figure><img src="/files/q6TFIBJBklR5MNNWbzjP" alt=""><figcaption></figcaption></figure>

#### Using Other Values as Answers

<figure><img src="/files/bF4AA90zbOHLWtysntmo" alt=""><figcaption></figcaption></figure>

You can dynamically set the value of a Text question by referencing other variables in your flow:

* Enable **Another answer/variable** in the settings.
* Any other data-type-compatible variables will be available to choose (e.g. from a previous question, a calculated variable, or an API response).

This is useful for personalization or autofill behavior (e.g. pulling a first name from a previous step).

#### Constant

To assign a static value to a Text question that never changes:

* Use the **Constant** setting.

This is helpful for storing a fixed value (e.g. an internal tag or a source code) in the answers payload without requiring responder input.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.formsort.com/adding-questions-and-content/question-reference/text-question.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
