Feature #24925
closedMandatory for Selectbox with TCA not possible
100%
Description
It's not possible to create a backend Selectbox that is mandatory with only 1 Item selectable:
'config' => array(
'type' => 'select',
'size' => 5,
'autoSizeMax' => '12',
'minitems' => 1,
'maxitems' => 1,
...
)
It's only possible if the 'maxitems' is set to 2 which might not be the correct setting.
'category' => array(
'exclude' => 0,
'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_event.category',
'config' => array(
'type' => 'select',
'size' => 5,
'autoSizeMax' => '12',
'minitems' => 1,
'maxitems' => 1,
'foreign_table' => 'tx_myext_domain_model_category',
'foreign_table_where' => 'AND tx_myext_domain_model_category.pid=###CURRENT_PID###',
'foreign_sortby' => 'sorting',
'MM' => 'tx_myext_event_category_mm',
'eval' => 'trim,required',
),
),
Value is not mandatory
Tested in 4.4 and 4.5, also lot's of reports online that it's not possible... (or at least there is no obvious and documented way to do it.)
(issue imported from #M17440)
Files
Updated by Andreas Wolf about 13 years ago
- Category set to Backend User Interface
- Assignee set to Andreas Wolf
- Target version deleted (
0)
This sounds like an error in the corresponding JavaScript. Would you be able to dig into that with some additional help?
Updated by Andreas Wolf about 13 years ago
- Status changed from New to Needs Feedback
Updated by Johannes no-lastname-given almost 13 years ago
Rather the single TCE select form element does not register itself as 'required property' if 'minitems' is greater zero.
Updated by Benni Mack over 11 years ago
- Assignee changed from Andreas Wolf to Benni Mack
Updated by Alexander Opitz almost 11 years ago
Hi Benni,
are you still on this issue?
Updated by Gerrit Code Review almost 11 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27169
Updated by Benni Mack almost 11 years ago
just pushed Johannes' patch to Gerrit, but don't know if his solution works with FlexForms yet.
Updated by Gerrit Code Review almost 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27169
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27169
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28625
Updated by Benni Mack over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6cf39f6da1afd35bea333fcd7da9ab6dc0d93159.
Updated by Gerrit Code Review over 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29507
Updated by Stefan Neufeind over 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 65896ee8aa3c5f9f684fc5ac31165b29abdcc525.