Project

General

Profile

Actions

Feature #24925

closed

Mandatory for Selectbox with TCA not possible

Added by Noel Bossart about 13 years ago. Updated over 5 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 #1

Updated by Andreas Wolf over 12 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?

Actions #2

Updated by Andreas Wolf over 12 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Andreas Wolf over 12 years ago

  • Complexity set to medium
Actions #4

Updated by Johannes no-lastname-given about 12 years ago

Rather the single TCE select form element does not register itself as 'required property' if 'minitems' is greater zero.

Actions #5

Updated by Benni Mack about 11 years ago

  • Assignee changed from Andreas Wolf to Benni Mack
Actions #6

Updated by Alexander Opitz about 10 years ago

Hi Benni,

are you still on this issue?

Actions #7

Updated by Gerrit Code Review about 10 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

Actions #8

Updated by Benni Mack about 10 years ago

just pushed Johannes' patch to Gerrit, but don't know if his solution works with FlexForms yet.

Actions #9

Updated by Gerrit Code Review about 10 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

Actions #10

Updated by Gerrit Code Review about 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

Actions #11

Updated by Gerrit Code Review about 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

Actions #12

Updated by Benni Mack about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Gerrit Code Review about 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

Actions #14

Updated by Stefan Neufeind about 10 years ago

  • Status changed from Under Review to Resolved
Actions #15

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF