[TASK] Improve maximum length for TCA text type .rst documentation
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Feature-24906-MaxForTextElement.rst
1 ================================================================
2 Feature: #24906 - Configuration for maximum chars in TextElement
3 ================================================================
4
5 Description
6 ===========
7
8 TCA type ``text`` now supports the HTML5 attribute ``maxlength`` to restrict
9 text to a given maximum length. Line breaks are usually counted as two
10 characters.
11
12 Not every browser supports this, see sites like
13 `w3schools.com <http://www.w3schools.com/tags/att_textarea_maxlength.asp>`_
14 for details.
15
16 The new option can be used like this:
17
18 .. code-block:: php
19
20 'teaser' => array(
21 'label' => 'Teaser',
22 'config' => array(
23 'type' => 'text',
24 'cols' => 60,
25 'rows' => 2,
26 'max' => '30',
27 )
28 ),