---
title: "Feature: #24906 - Configuration for maximum chars in TextElement"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-24906"
source: "Changelog/7.1/Feature-24906-MaxForTextElement.rst"
typo3-version: "7.1"
typo3-major: 7
type: "feature"
issue: 24906
forge: "https://forge.typo3.org/issues/24906"
tags: ["TCA", "Backend"]
rendered: "2026-09-17T21:17:42+00:00"
---

# Feature: #24906 - Configuration for maximum chars in TextElement {#feature-24906-configuration-for-maximum-chars-in-textelement}

See [forge#24906](https://forge.typo3.org/issues/24906)

## Description {#description}

TCA type `text` now supports the HTML5 attribute `maxlength` to restrict
text to a given maximum length. Line breaks are usually counted as two
characters.

Not every browser supports this, see sites like
[w3schools.com](http://www.w3schools.com/tags/att_textarea_maxlength.asp)
for details.

The new option can be used like this:

```php
'teaser' => array(
	'label' => 'Teaser',
	'config' => array(
		'type' => 'text',
		'cols' => 60,
		'rows' => 2,
		'max' => '30',
	)
),
```
