Remaining Chars for InputTextarea

PrimeFaces InputTextarea extends standard inputTextarea component with theming, autogrow and cross browser maxlength constraint. Latest addition to this extension set is displaying number of characters left during typing.

To make things more flexible (as usual in PrimeFaces), we have added two new attributes;

- counter: Id of the output component to display remaining characters text.
- counterTemplate: Customizable template text like “{0} chars remaining! Use it wisely”

Check out PrimeFaces Labs to try it out!

8 thoughts on “Remaining Chars for InputTextarea

  1. Cagatay, I knew this would be the next blog post since i saw your enthusiasm on the new feature request in issue tracker and I was waiting patiently for you to post this blog. Um, no, I’m not psychotic. :)

    I definitely wanted this and im glad you added this new feature. Thanks!

  2. I love this, and had to implement something like this before. It would be cool, if the component allows to specifiy a maximum amount of columns per line and a maximum number of lines, too. If thats the case, I could get rid of my custom implementation :-)

  3. What do you think about adding feature after you exceed the max number of words, it count in the negative direction like what stackoverflow does?