# Field Types Reference
Complete reference for all supported field types in TypeDialog forms.
## Overview
TypeDialog supports multiple field types for different input scenarios. Each backend (CLI, TUI, Web) renders these types appropriately for its interface.
## Supported Field Types
### Text
Single-line text input.
```toml
[[elements]]
name = "username"
type = "text"
prompt = "Enter username"
placeholder = "john_doe"
default = "admin"
required = true
```
**Attributes**:
- `prompt`: Display label
- `placeholder`: Example text
- `default`: Pre-filled value
- `required`: Validation flag
**Backend rendering**:
- CLI: Inline text prompt with validation
- TUI: Text input field in input panel
- Web: HTML ``
---
### Password
Secure password input (masked characters).
```toml
[[elements]]
name = "api_token"
type = "password"
prompt = "API Token"
required = true
help = "Your secret authentication token"
```
**Attributes**:
- `prompt`: Display label
- `required`: Validation flag
- `help`: Additional guidance
**Backend rendering**:
- CLI: Hidden input with asterisks
- TUI: Masked input field
- Web: HTML ``
---
### Confirm
Boolean yes/no selection.
```toml
[[elements]]
name = "enable_feature"
type = "confirm"
prompt = "Enable experimental features?"
default = false
```
**Attributes**:
- `prompt`: Question to display
- `default`: Initial value (true/false)
**Backend rendering**:
- CLI: Yes/No buttons
- TUI: Radio buttons (Yes/No)
- Web: Radio buttons or toggle switch
---
### Select
Single selection from predefined options.
```toml
[[elements]]
name = "database_driver"
type = "select"
prompt = "Database type"
required = true
[[elements.options]]
value = "sqlite3"
label = "SQLite (embedded)"
[[elements.options]]
value = "mysql"
label = "MySQL (server)"
[[elements.options]]
value = "postgresql"
label = "PostgreSQL (server)"
```
**Attributes**:
- `prompt`: Display label
- `options`: Array of value/label pairs
- `required`: Validation flag
- `default`: Pre-selected value
**Backend rendering**:
- CLI: Arrow-key navigation list
- TUI: Dropdown or scrollable list
- Web: HTML `