Data lists: Heading field#
Behaves exactly like the Text field (it actually extends TextFieldType), but is rendered inside a
<th> cell instead of a <td>, making it suitable e.g. for a row's title column.
Example#
$builder
->addField('title', HeadingFieldType::class, [
'truncate' => 50,
])
->getDatalist();
Options#
| Option | Default | Description |
|---|---|---|
truncate |
not set | Truncates the value to the given number of characters, using the safe_truncate Twig filter. |
This field type also supports the common field options, including escape which is honored by this field type.
Block name#
The block rendered for this field type is heading_field. Override it in your own Datalist theme if you need to
customize the markup.