Feature: #97013 - New TCA type "email"
See forge#97013
Description
Especially TCA type input
has a wide range of use cases, depending
on the configured render
and the eval
options. Determination
of the semantic meaning is therefore usually quite hard and often leads to
duplicated checks and evaluations in custom extension code.
In our effort of introducing dedicated TCA types for all those use cases, the
TCA type email
has been introduced. It replaces the eval=email
option of TCA type input
.
The TCA type email
features the following column configuration:
autocomplete
behaviour
:allow
Language Synchronization default
eval
:unique
andunique
In Pid field
Control field
Information field
Wizard mode
nullable
placeholder
read
Only required
search
size
Note
The soft reference definition softref=>email
is automatically applied
to all email
fields.
The following column configuration can be overwritten by page TSconfig:
read
Only size
The migration from eval='email'
to type=email
is done like following:
// Before
'email_field' => [
'label' => 'Email',
'config' => [
'type' => 'input',
'eval' => 'trim,email',
'max' => 255,
]
]
// After
'email_field' => [
'label' => 'Email',
'config' => [
'type' => 'email',
]
]
An automatic TCA migration is performed on the fly, migrating all occurrences
to the new TCA type and triggering a PHP E_
error
where code adoption has to take place.
Note
The value of TCA type email
columns is automatically trimmed before
being stored in the database. Therefore, the eval=trim
option is no
longer needed and should be removed from the TCA configuration.
Impact
It's now possible to simplify the TCA configuration by using the new
dedicated TCA type email
.