https://github.com/appswithlove/statamic-charfield
Input with visual feedback for Statamic
https://github.com/appswithlove/statamic-charfield
statamic statamic-addon
Last synced: about 1 month ago
JSON representation
Input with visual feedback for Statamic
- Host: GitHub
- URL: https://github.com/appswithlove/statamic-charfield
- Owner: appswithlove
- License: mit
- Created: 2016-12-01T09:12:34.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-10-16T09:13:26.000Z (4 months ago)
- Last Synced: 2025-12-15T02:20:48.315Z (about 2 months ago)
- Topics: statamic, statamic-addon
- Language: PHP
- Homepage: https://statamic.com/addons/awl/charfield
- Size: 59.6 KB
- Stars: 7
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Statamic character counting field

> An input field or textarea which shows the status of the length
> with colored feedback on the input element.
## Installation
Install with Composer:
composer require appswithlove/statamic-charfield
## Usage
Use the «Extended Section» field and choose the background you like in the blueprint editor.
### Configuration
| Option | Description |
|---------------|----------------------------------------|
| `input_type` | Choose between input or textarea |
| `low` | Minimal length |
| `high` | Maximal length |
| `optimal_min` | Optional min length for optimal result |
| `optimal_max` | Optional max length for optimal result |
| `hard_limit` | Maxlength for input field |
- If the length is outside of min and max the color is **red**.
- If the length is between min and max but not between the optimal length **dark yellow**
- If the length is in the optional range or between min and max if no optimal length is provided the color is **green**
## Screenshot
