hestec/silverstripe-fieldcounter
Composer 安装命令:
composer require hestec/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
This is an update of the PlatoCreative fieldcounter: https://github.com/PlatoCreative/silverstripe-fieldcounter This repository has an updated folder structure and moves the css and js to the resources folder.
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
$ composer require hestec/silverstripe-fieldcounter:1.*
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-05-28