Single Line
Single Line fields store short text values like names, emails, phone numbers, and URLs.
Go to Studio → Collections → [Collection Name] → Fields tab → Add Field, then select Single Line. To edit an existing field, click the edit action next to it.
View all settings
Basic Settings
| Setting | Description |
|---|---|
| Field Name | Text input, required. Unique identifier for the field. |
| Input Type | Dropdown, required. Choose Text, Email, URL, Tel, Password, Char, or File. |
| Default Value | Text input. Pre-filled value for new records. Not available for File. |
| Display Label | Text input. Human-readable label shown in forms. |
| Icon | Icon picker. Visual identifier. |
| Status | Toggle, defaults to true. Enable or disable the field. |
| Required | Checkbox. Make the field mandatory. |
Advanced Settings
| Setting | Description |
|---|---|
| Description | Text area. Documents the field's purpose. |
| Form Visibility | Dropdown. Show in Add, Edit, or Both forms. |
| DB Field Name | Text input. Custom database column name. |
| Primary Key | Checkbox. Mark as unique record identifier. |
| Unique | Checkbox. Prevent duplicate values. |
| Faker Type | Dropdown. Disabled and Deprecated. Configure faker through collection options for each field. |
| Min Length | Number input. Minimum characters required. |
| Max Length | Number input. Maximum characters allowed. |
| Regex | Text input. Custom validation pattern. |
Input Types
- Text — General short text for names, titles, labels
- Email — Email addresses with built-in format validation
- URL — Web addresses with URL validation
- Tel — Phone numbers (no format validation, just semantic)
- Password — Masked input for sensitive data, stored securely
- Char — Single character input
- File — File uploads with size and type constraints
When to Use
Choose Single Line when:
- Content fits on one line (under 255 characters typically)
- You need input validation (email, URL, phone)
- Uploading files or images (File input type)
Choose Multi Line instead when:
- Content may span multiple lines
- You need rich text formatting
Settings
See Common Settings for shared options. Single Line supports Primary Key and Unique.
Validation (Advanced Settings)
| Setting | Description |
|---|---|
| Min Length | Minimum number of characters required. |
| Max Length | Maximum number of characters allowed. |
| Regex | Custom validation pattern (for example, phone number format). |
File Input Type (Basic Settings)
When Input Type is set to File, file-specific options appear in the Basic Settings tab. Validation settings (Min/Max Length, Regex) and Default Value are not available.
View all file input settings
| Setting | Description |
|---|---|
| Quick Presets | Apply common configurations for Images, Documents, Spreadsheets, or Media. |
| Allowed Extensions | Restrict uploads to specific file extensions (for example, jpg, png, pdf). |
| Allowed MIME Types | Restrict uploads by MIME type (for example, application/pdf). Hidden if Is Image is active. |
| Max File Size (MB) | Maximum allowed file size in Megabytes. |
| Add Auto Prefix | Automatically prefix filenames for uniqueness or organization. |
| Is Image | Enable image-specific validation and constraints. |
Image Constraints (Is Image active)
When Is Image is enabled, additional constraints for dimension and ratio appear:
| Setting | Description |
|---|---|
| Min Width (px) | Minimum horizontal dimension in pixels. |
| Max Width (px) | Maximum horizontal dimension in pixels. |
| Min Height (px) | Minimum vertical dimension in pixels. |
| Max Height (px) | Maximum vertical dimension in pixels. |
| Is Square | Enforces a strict 1:1 aspect ratio for all image uploads. |
Use Cases
- Names, titles, and labels (Text)
- Email addresses with validation (Email)
- Website links and URLs (URL)
- Phone numbers (Tel)
- Secure credentials (Password)
- Document and image uploads (File)
Related
- Common Settings — Shared settings reference
- Multi Line — For longer text content