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

# Text questions

> Short text, Long text, Number, Email, Phone, and Date — configuration options for every text input type.

Text questions collect typed input from respondents. There are six types, each optimised for a specific kind of data.

***

## Short text

A single-line text input. Best for names, short answers, codes, or any brief free-form response.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/feedal/images/building-forms-questions-short-text.png" alt="Short text question in the canvas" />

| Field                  | Type   | Default             | Notes                                            |
| ---------------------- | ------ | ------------------- | ------------------------------------------------ |
| `placeholder`          | Text   | `Your answer here…` | Hint text shown inside the empty input           |
| `default_value`        | Text   | —                   | Pre-filled value the respondent can edit         |
| `max_length`           | Number | `250`               | Maximum characters allowed (1–5000)              |
| `validation_pattern`   | Enum   | —                   | Optional format validation (see below)           |
| `custom_regex`         | Text   | —                   | Only shown when `validation_pattern` is `custom` |
| `custom_error_message` | Text   | —                   | Error message shown when validation fails        |

**Validation patterns:**

| Value          | Validates                              |
| -------------- | -------------------------------------- |
| *(none)*       | No format validation                   |
| `url`          | Must be a valid URL                    |
| `alphabetic`   | Letters only (a–z, A–Z)                |
| `alphanumeric` | Letters and digits only                |
| `custom`       | Must match the regex in `custom_regex` |

***

## Long text

A multi-line text area. Best for open-ended feedback, comments, or any response that may be several sentences.

| Field           | Type   | Default             | Notes                                     |
| --------------- | ------ | ------------------- | ----------------------------------------- |
| `placeholder`   | Text   | `Your answer here…` | Hint text                                 |
| `default_value` | Text   | —                   | Pre-filled value                          |
| `max_length`    | Number | `1000`              | Maximum characters (1–10000)              |
| `min_length`    | Number | —                   | Minimum characters required (0 or higher) |

***

## Number

A numeric input. Best for ages, quantities, scores, or any whole or decimal number.

| Field           | Type   | Default | Notes                                   |
| --------------- | ------ | ------- | --------------------------------------- |
| `placeholder`   | Text   | `0`     | Hint text                               |
| `default_value` | Number | —       | Pre-filled value                        |
| `min`           | Number | `0`     | Minimum accepted value                  |
| `max`           | Number | `100`   | Maximum accepted value                  |
| `step`          | Number | —       | Increment step for up/down controls     |
| `format_prefix` | Text   | —       | Text shown before the number (e.g. `$`) |
| `format_suffix` | Text   | —       | Text shown after the number (e.g. `kg`) |

***

## Email

A text input validated as an email address. Best for collecting contact details.

| Field             | Type                   | Default            | Notes                                                   |
| ----------------- | ---------------------- | ------------------ | ------------------------------------------------------- |
| `placeholder`     | Text                   | `name@example.com` | Hint text                                               |
| `allowed_domains` | Text (comma-separated) | —                  | Only these domains are accepted (e.g. `company.com`)    |
| `blocked_domains` | Text (comma-separated) | —                  | These domains are rejected (e.g. `gmail.com,yahoo.com`) |

<Note>
  `allowed_domains` and `blocked_domains` accept a comma-separated list.
  Entries are trimmed and empty values are removed automatically.
</Note>

***

## Phone

A phone number input with optional country code selection.

| Field                     | Type    | Default                      | Notes                                                     |
| ------------------------- | ------- | ---------------------------- | --------------------------------------------------------- |
| `placeholder`             | Text    | `+1 (555) 000-0000`          | Hint text                                                 |
| `default_value`           | Text    | —                            | Pre-filled value                                          |
| `allow_country_selection` | Boolean | `true`                       | Shows a searchable country picker with flag and dial code |
| `default_country`         | Enum    | Detected from browser locale | ISO 3166-1 alpha-2 code for the pre-selected country      |
| `strict_formatting`       | Boolean | —                            | Enforce E.164 phone number format                         |

When `allow_country_selection` is enabled, the stored answer is a structured object instead of a plain string:

```json theme={null}
{ "country_code": "IN", "dial_code": "+91", "number": "9876543210" }
```

Email notifications and integrations automatically format this as `+91 9876543210`.

***

## Date

A date picker. Best for appointment scheduling, date-of-birth, or any calendar date.

| Field                  | Type    | Default      | Notes                                           |
| ---------------------- | ------- | ------------ | ----------------------------------------------- |
| `placeholder`          | Text    | —            | Hint text                                       |
| `default_value`        | Date    | —            | Pre-filled date; respects all constraints below |
| `format`               | Enum    | `MM/DD/YYYY` | Display format (see below)                      |
| `min_date`             | Date    | —            | Earliest selectable date                        |
| `max_date`             | Date    | —            | Latest selectable date                          |
| `disable_weekends`     | Boolean | —            | Greys out and blocks Saturdays and Sundays      |
| `disable_past_dates`   | Boolean | —            | Blocks all dates before today                   |
| `disable_future_dates` | Boolean | —            | Blocks all dates after today                    |
| `default_to_current`   | Boolean | —            | Pre-selects today's date                        |

**Date formats:**

| Value        | Example    |
| ------------ | ---------- |
| `MM/DD/YYYY` | 01/31/2025 |
| `DD/MM/YYYY` | 31/01/2025 |
| `YYYY-MM-DD` | 2025-01-31 |

***

## Next steps

<CardGroup cols={2}>
  <Card title="Choice questions" icon="check-square" href="/building-forms/questions/choice">
    Multiple choice, Checkbox, Dropdown, Yes/No, Picture choice, and Ranking.
  </Card>

  <Card title="Conditional branching" icon="code-branch" href="/building-forms/workflow/branching">
    Route respondents based on their text or number answers.
  </Card>
</CardGroup>
