The Text field is the most versatile field type in Penbox. It captures single-line or multi-line text input, making it ideal for names, addresses, descriptions, notes, IDs, and any other free-form text data. Text fields can be configured with character limits, validation patterns, and placeholder hints. They support both simple input (like a name) and complex multi-line content (like detailed notes or descriptions).Documentation Index
Fetch the complete documentation index at: https://docs.penbox.io/llms.txt
Use this file to discover all available pages before exploring further.
When to Use
Use Text fields for:- Names (person, company, product)
- Addresses (street, city, full address)
- Descriptions and notes
- IDs and reference numbers
- Email addresses (simple text, or use Email element in forms)
- Phone numbers (simple text, or use Phone element in forms)
- URLs and website addresses
- Comments and feedback
- Any free-form text input
- Use Number for numeric values (enables calculations)
- Use Date for dates (enables date-based features)
- Use Choices for predefined options (ensures consistency)
Configuration Options
| Option | Description | Type | Default | Example |
|---|---|---|---|---|
key | Unique identifier | String | Required | company_name |
name | Display label | String | Required | ”Company Name” |
description | Help text for users | String | Optional | ”Legal name of your company” |
multiline | Enable multi-line textarea | Boolean | false | true |
maxlength | Maximum character count | Number | None | 500 |
pattern | Regex validation pattern | String | None | ^[A-Z0-9]+$ |
placeholder | Hint text shown in empty field | String | None | ”Enter company name” |
visibility | Display setting | String | always-visible | hide-when-empty |
section | Section this field belongs to | String | None | Section UUID |
Examples
Basic Single-Line Text
Collect a company name:Multi-Line Text (Notes)
Collect detailed notes or descriptions:Validated Text (IBAN)
Collect structured text with validation:Hidden Text Field (System Use)
Store data not shown to users:Validation
Text fields support several validation mechanisms:Character Length
Usemaxlength to limit input:
- Prevents overly long entries
- Ensures data fits in external systems
- Useful for regulated fields with character limits
Pattern Matching
Usepattern for regex validation:
- Format validation (IBANs, postal codes, IDs)
- Character restrictions (alphanumeric only)
- Structure enforcement
| Use Case | Pattern | Example |
|---|---|---|
| Alphanumeric only | ^[A-Z0-9]+$ | ABC123 |
| Email format | ^[^\s@]+@[^\s@]+\.[^\s@]+$ | user@domain.com |
| Phone (simple) | ^\+?[0-9\s\-\(\)]+$ | +1 (555) 123-4567 |
| Postal code (BE) | ^[0-9]{4}$ | 1000 |
| IBAN | ^[A-Z]{2}[0-9]{2}[A-Z0-9]+$ | BE68539007547034 |
Best Practices
Use descriptive names:- “Company Legal Name” is better than “Name”
- “Incident Description” is better than “Description”
- Clear names help users and Intelligence understand what’s expected
- Use the
descriptionfield to guide users - Explain format requirements, especially for validated fields
- Mention if the field is required for compliance
- Single-line for short, structured text (names, IDs, codes)
- Multi-line for longer content (descriptions, notes, comments)
- Set appropriate
maxlengthfor multi-line to prevent excessive input
- Only validate when necessary (IBANs, IDs, codes)
- Don’t over-validate (strict patterns can frustrate users)
- Test patterns thoroughly before deploying
- Use “hide when empty” for optional supplementary fields
- Use “always hide” for system IDs and technical data
- Keep essential fields always visible
Related Field Types
Number
Use for numeric values that need calculations
Choices
Use when input should be from predefined options
Date
Use for date values to enable date-based features
Data Schema Overview
Back to Data Schema overview