IRRE: Provide default values for created records
Let's say you have an IRRE fields that hold's tt_content records and in this context mostly you want to use the "Image" CE.
AFAIK there is no possibility to provide default values for IRRE fields. So I'd like to introduce 'foreign_table_defaultValues' as new option for 'inline' elements:
config => array( 'type' => 'inline', 'foreign_table' => 'tt_content', 'foreign_table_defaultValues' => array( 'CType' => 'image' ), )
[FEATURE] IRRE: Provide default values for created records
This change introduces a new TCA option to configure 'inline' fields:
'foreign_record_defaults' gives you the possibility to set values
in new created records.
config => array(
'type' => 'inline',
'foreign_table' => 'tt_content',
'foreign_record_defaults' => array(
'CType' => 'image'
That means tt_content elements that are created for this IRRE field
will be image content elements by default (and can be set to another
type by the editor before saving).
The following fields can't be set by this feature because they must
stay under system control:
uid, pid and t3ver_*
and the fields that are configured with the following TCA-ctrl options:
crdate, cruser_id, delete, origUid, transOrigDiffSourceField,
transOrigPointerField and tstamp
Reviewed-by: Oliver Hader
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn