Customizable Character Counter
Overview
The Customizable Character Counter is a powerful text input widget that provides real-time feedback on text length, helping users stay within defined limits while creating content.
Why Use This Widget?
Standard Mendix text inputs don't show users how many characters they've typed or how close they are to the limit. This leads to frustration when users hit unexpected limits or lose content. The Customizable Character Counter solves this by providing clear, real-time feedback throughout the typing experience.
Key Capabilities:
Real-Time Counting
Watch the counter update instantly as you type. Choose between character counting (ideal for database field limits, SMS messages, or social media posts) or word counting (perfect for essays, descriptions, or content with word requirements).
Smart Paste Handling
Unlike standard inputs that reject entire paste operations when content exceeds limits, this widget intelligently truncates pasted content to fit within the maximum allowed characters. Users see exactly what was kept, and visual feedback indicates the limit was reached.
Visual Warning System
Configure a warning threshold (e.g., 80%) to alert users when they're approaching the limit. The input and counter change to yellow as a warning, then red when the limit is reached or exceeded. This graduated feedback helps users manage their content proactively.
Easy Integration
Simply drag the widget onto your page, bind it to a string attribute, and configure your preferred settings. The widget works out of the box with sensible defaults: 200 character limit, 80% warning threshold, and block exceed enabled.
Documentation
The Customizable Character Counter widget is designed for Mendix applications where users need real-time feedback on text input length. Use this widget when:
Form fields with limits: Add character counters to comment fields, descriptions, bio sections, or any text input with length restrictions
Data validation: Prevent oversized text entries that could cause database truncation issues
Features and Limitations
Features:
- Real-time character or word counting
- Configurable character/word limits
- Visual warning system with customizable threshold (changes color when approaching limit)
- Smart paste handling - truncates pasted content to fit limit instead of rejecting entirely
- Two input types: Text Box (single line) and Text Area (multi-line)
- Counter position options: below input or top-right
- Block exceed mode to prevent exceeding limits
- Action events: onChange, onEnter, onLeave, onLimitExceed
- Custom CSS class support for styling
- Responsive design
Limitations:
Web platform only (not supported on native mobile)
The "Use Default Count" option to automatically read the domain model's max length may not work in all Mendix versions due to API limitations; use "Manual Limit" for reliable results
Rich text/HTML content is counted as plain text including tags
Releases
A versatile text input widget with real-time character and word counting capabilities for Mendix applications.
Key Features:
- Dual Input Types: Support for both single-line text box and multi-line text area inputs
- Flexible Counting: Count characters or words based on your requirements
- Configurable Limits: Set manual character/word limits with customizable thresholds
- Smart Paste Handling: When pasting content exceeding the limit, the widget automatically truncates to the maximum allowed character.
- Visual Feedback: Warning state (yellow) when approaching the limit ,Exceeded state (red) when at or over the limit, Customizable warning threshold percentage
- Counter Display Options: Position the counter below the input or at the top-right Block
- Exceed Mode: Optionally prevent users from exceeding the character/word limit
- Action Events: Trigger microflows/nanoflows on change, enter key, blur, and limit exceed events Fully
- Customizable Styling: Apply custom CSS classes to input and counter elements