Adds a counter to defined fields to show remaining characters
Shows a field counter on specified fields in the SilverStripe CMS
To add the field counter to a Silverstripe field in the CMS you need to add:
TextField::('myfield')->setAttribute('data-fieldcounter', 140);
If you require different limits change the 140.
Note: Adding this to a TextareaField prevents new lines.
If you want to prevent more text than your limit, use the built in HTML attribute maxlength
e.g.
TextField::('myfield')->setAttribute('maxlength', 140);
SilverStripe 3
$ composer require plato-creative/silverstripe-fieldcounter:1.*
SilverStripe 4
$ composer require plato-creative/silverstripe-fieldcounter:2.*
See Docs
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem