#98993Flexform select with multiple fixed and DB values fails
Description
I have a flexform with a select and want to have two options (nothing and all) plus values from the database. If I select the second (fixed value) after saving the first value is selected again. Here is my code:
<settings.myfield>
<TCEforms>
<label>My label</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items>
<numIndex index="0">
<numIndex index="0">---</numIndex>
<numIndex index="1"></numIndex>
</numIndex>
<numIndex index="1">
<numIndex index="0">Alle</numIndex>
<numIndex index="1">all</numIndex>
</numIndex>
</items>
<foreign_table>tablename</foreign_table>
<foreign_table_where>
...
</foreign_table_where>
</config>
</TCEforms>
</settings.myfield>Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 2
-
Rico Drexler commented 07/21/23, 07:55
-
Christian Kuhn commented and changed status
NewClosed 10/26/23, 13:59Thanks for the comment, Rico.
I did not actively test this, but it sounds as if you’re correct with your assessment.
Since this issue did not gain much traction, I hope it’s ok to close here for now.
Please re-open or create a new issue in case we missed something.
This is probably not a bug. With foreign_table you can only store INT values, unless you set the value allowNonIdValues to true.
Look here:
https://docs.typo3.org/m/typo3/reference-tca/10.4/en-us/ColumnsConfig/Type/selectSingle.html#allownonidvalues