[TYPO3-core] Provide default values for created records

Andreas Kiessling kiessling at pluspol.info
Fri Mar 8 10:58:42 CET 2013


On 08.03.2013 10:08, Sebastian Michaelsen wrote:
> 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.

Are all your records with the IRRE field in a "special" sysfolder? Then
you should be able to just set
TCAdefaults.tt_content.CType = image

> 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 (the naming of the new option might be improved):
> config => array(
>  'type' => 'inline',
>  'foreign_table' => 'tt_content',
>  'foreign_table_defaultValues' => array(
>    'CType' => 'image'
>  ),
> )
> Please tell me if i'm missing something and this can already be achieved
> somehow.
> What do you think about such a feature?

I think i've read some time ago about misusing foreign_selector to
"select" what type of child you want to create. But that looked rather
hacky.. So IMHO: +1, but i would like the possibility to add "more"
buttons with presets like it is possible with sections in FlexForms. So
you don't have to reload the whole form, when you need a different type,
but just select the right one from the start.
Maybe that is already possible with >= 4.7, since FAL also has a
different button and sets the inline records depending on the selected
file type. But configuring that through TCA would be nice!


More information about the TYPO3-team-core mailing list