TYPO3 TCA select, NULL value in items array
extbase, fluid, typo3
Solution
Try this:
'items' => array(
array('', -1))
The second parameter in the array is not the value for the db!
Problem
I have made an extension in Typo3 4.5 with extbase and fluid. Now to insert some data i use the backend module 'list' that makes some forms with the TCA of the tables. To make a select box optional, I insert an item before the foreign table like this: ``` 'feuser' => array( 'exclude' => 0, 'label' => 'LLL:EXT:yes/Resources/Private/Language/locallang_db.xml:tx_yes_domain_model_schools.feuser', 'config' => array( 'type' => 'select', 'items' => array( array('', NULL), ), 'foreign_table' => 'fe_users', 'maxitems' => 1, ), ), ``` Now, since i have a relation (with NULL alowed) in my DB, i have to insert a NULL value. But like this it doesn't work. I have also tried '', "" and 0. But those don't work either. I would appreciate any help.