Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Show Character Count on TextField in Admin End


Go to End


2263 Views

Avatar
Ryoken

Community Member, 18 Posts

19 July 2009 at 12:28pm

I'm looking for the most efficient, and reusable way, to display the character count on Text fields in the admin end.. Ideally only on fields where a maximum length is shown..

Currently I just add a literal field under the Text Fields with a "Maximum Length of X Characters"... What I'd like is to have it be something like "X of Y Characters Used" or the like.. Best case it would be done automatically, as in any TextFields that have a limit will automatically get the feedback under them ( Which I'm sure would be the most complex to initially create, but would be idea for reusing on project after project.. ), but if being more manual with inline scripts is the best way, then I'll gladly take it.

Any ideas ?
My web strengths are more in the area of CSS and HTML, not PHP and Javascript, so it's a little out of my league.

I would be most thankful for any help.