Project

General

Profile

Actions

Feature #24925

closed

Mandatory for Selectbox with TCA not possible

Added by Noel Bossart almost 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Target version:
-
Start date:
2011-02-02
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
medium
Sprint Focus:

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

not required.png (27.3 KB) not required.png Administrator Admin, 2011-02-02 09:29
class.t3lib_tceforms.php.patch (643 Bytes) class.t3lib_tceforms.php.patch Patched t3lib/class.t3lib_tceforms.php for Typo3 4.6.1 Johannes no-lastname-given, 2012-01-19 19:52

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #24871: Required select box element isn't requiredClosed2011-01-28

Actions
Actions

Also available in: Atom PDF