Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
foreign_table
foreign_table
-
- Type
- string (table name)
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Proc. / Display
- RenderType
- all
The item-array will be filled with records from the table defined here. The table must have a TCA definition.
The uids of the chosen records will be saved in a comma separated list by default.
Use
property MM <columns-
to store the values in an intermediate MM table instead.select- properties- mm> Deprecated since version 11.2
Usage of the
foreign_
relation with the tabletable sys_
Has been deprecated. Use TCA field type called language instead.language
Examples
Select singe field with enabled selectIcons
[
'columns' => [
'select_single_12' => [
'exclude' => 1,
'label' => 'select_single_12 foreign_table selicon_field',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_styleguide_elements_select_single_12_foreign',
'fieldWizard' => [
'selectIcons' => [
'disabled' => false,
],
],
],
],
],
]
Select field with foreign table via MM table
[
'columns' => [
'select_single_15' => [
'exclude' => 1,
'label' => 'select_single_15 foreign_table',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_styleguide_staticdata',
'MM' => 'tx_styleguide_elements_select_single_15_mm',
],
],
],
]