Reputation: 4641
I am developing an extension in Typo3 v6. In the backend I want to show a selectfield taking the values from another table but filling the value (text) into the table instead of the ID. Here is my code (catlabel should be filled into the advert-table):
'categoryname' => array(
'exclude' => 0,
'label' => 'LLL:EXT:myextension/Resources/Private/Language/locallang_db.xlf:tx_myextension_domain_model_advert.categoryname',
'config' => array(
'type' => 'select',
'allowNonIdValue' => true,
'size' => 1,
'foreign_table' => 'tx_myextension_domain_model_categoryoption',
'foreign_field' => 'catlabel'
),
Upvotes: 2
Views: 1897
Reputation: 1
The itemsProcFunc won't work in my case. It stored the id in the database every time.
The hooks wont work.
I use the type 'user' and build everything by myself. https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/User/Index.html It's a little bit more complicated. But if you inject the needed repository in your classs and define all needed parameter in the tca, it build in acceptable time.
Upvotes: 0