plato-creative/silverstripe-fieldcounter
Composer 安装命令:
composer require plato-creative/silverstripe-fieldcounter
包简介
Adds a counter to defined fields to show remaining characters
README 文档
README
Shows a field counter on specified fields in the SilverStripe CMS
Usage
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);
Install
SilverStripe 3
$ composer require plato-creative/silverstripe-fieldcounter:1.*
SilverStripe 4
$ composer require plato-creative/silverstripe-fieldcounter:2.*
Documentation
See Docs
统计信息
- 总下载量: 23.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-01-12