Bug #78941
closedempty option for select TCA type
0%
Description
I see there is no other way to add an empty option for the items displayed in the selectbox than directly as an item in the array, or through a user func. Could someone confirm to me that's the only way? I cannot see an attribute to achieve this. Would this be helpful as a new feature? We are using some viewhelpers from `flux` that would need to add this empty option in the select box.
Updated by Sergio Catalá almost 8 years ago
This is the case when we use relations to other tables through foreign_table attribute.
Updated by Christian Kuhn almost 8 years ago
- Status changed from New to Needs Feedback
Using 'items' array in tca is the way to go, that's what it is for: Adding static items, empty or not. No need for an additional attribute in 'config' section, imho. Did I misunderstand your usecase?
Updated by Sergio Catalá almost 8 years ago
No, you're right. There was a misunderstanding with Claus Due.
"items" (with an empty option, or static items) and "foreign_table" can be used at the same time.
There was a viewhelper on flux depending on that and we had an attribute for adding this empty option whose behaviour was wrong, but he already fixed this.
Thanks, Christian.
You can close the issue.
Updated by Andreas Kienast almost 8 years ago
- Status changed from Needs Feedback to Closed
Closed as requested.