Feature #78078

Flexform: Support ds_pointerField pointing to a foreign record

Added by Sebastian Michaelsen almost 5 years ago. Updated over 4 years ago.

Should have
Backend API
Target version:
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


The field defined in ds_pointerField decides which FlexForm should be displayed so you can have different FlexForms for different "types" of records. I'm proposing to add the ability to read a related foreign field which determines which FlexForm to use.

Real world example: I want to display a FlexForm in sys_file_reference based on the mime type the file has. But the mime type is not available in the sys_file_reference record but in the related sys_file record.
(See https://forge.typo3.org/issues/77710 for more information on the real world example)

Im proposing to use the following syntax, which divides local and foreign field by colon:

$GLOBALS['TCA']['sys_file_reference']['columns']['mediaoptions'] = [
    'label' => 'Options',
    'config' => [
        'type' => 'flex',
        'ds_pointerField' => 'uid_local:mime_type',
        'ds' => [
            'video/vimeo' => 'FILE:EXT:mediaoptions/Configuration/FlexForms/Vimeo.xml',
            'video/youtube' => 'FILE:EXT:mediaoptions/Configuration/FlexForms/YouTube.xml',

I'm proposing this syntax because since TYPO3 4.7 there's already a very similar functionality for the ['ctrl']['type'] field.

For my real world extension I already solved this via a hook: https://github.com/smichaelsen/typo3-mediaoptions/blob/master/Classes/Hooks/GetFlexformDataStructureHook.php
(Tested only with TYPO3 7 so far)

Any feedback is welcome.

Related issues

Related to TYPO3 Core - Bug #77710: Configure the "rel" parameter for embedded Youtube videosClosedSebastian Michaelsen2016-08-31


Updated by Christian Kuhn almost 5 years ago

i think that's possible with ds_pointerfields and friends. please see the docu for details on that.


Updated by Christian Kuhn almost 5 years ago

  • Status changed from New to Needs Feedback

Updated by Riccardo De Contardi over 4 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Sebastian Michaelsen)

No feedback within 90 days > closing this issue.

If you think that this is the wrong decision, please reopen it or open a new issue with a reference to this one. Thank you.

Also available in: Atom PDF