Character Count
We’ve been working on this article. Please let us know how useful this new version is by voting.
You can use the Character Count UI Pattern to display the number of characters a user has entered or has remaining for an onscreen text area.
How to use the Character Count UI Pattern
Prerequisites: You have created an Input widget called MyInput and created a Local Variable called MyInputVariable with its Data Type set to Text.
-
In Service Studio, in the Toolbox, search for
Character Count
.The Character Count widget is displayed.
-
From the Toolbox, drag the Character Count widget into the Main Content area of your application's screen.
-
On the Properties tab, from the InputWidgetId drop-down, select the Input widget Id you have already created (MyInput).
-
In the Limit property, enter the maximum number of characters allowed, for example, 180, and set the IsDescending property to True.
By setting the Limit property to 180, the user can enter up to 180 characters, and by setting the IsDescending property to True, the character count will go from 180 to 0.
After following these steps and publishing the module, you can test the pattern in your app.
Properties
Property | Description |
---|---|
InputWidgetId (Text): Mandatory | The Input widget name that counts the characters. Examples
|
Limit (Integer): Mandatory | Character count limit. This value should be the same as the maximum length of the Input widget. Examples
|
IsDescending (Boolean): Optional | Defines whether the count is ascending or descending. Examples
|