Project

General

Profile

Actions

Bug #60247

closed

eval=>"required" not working with select fields

Added by Moritz Ahl over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2014-07-10
Due date:
% Done:

0%

Estimated time:
2.00 h
TYPO3 Version:
4.7
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

As a developer, i want to be able to enforce selection of exactly one item in a select field. But currently, it seems impossible to declare a TCA field of type "select" as mandatory. When leaving the field empty and saving the record.

Setting "eval" to "required" is ignored.

        'store' => array(
            'exclude' => 1,
            'label' => 'store',
            'config' => array(
                    'type' => 'select',
                    'foreign_table' => 'tx_myext_domain_model_store',
                    'size' => 1,
                    'autoSizeMax' => 30,
                    'items' => array(
                        array('', ''),
                    ),
                    'maxitems' => 1,
                    'minitems' => 1,
                    'multiple' => 0,
                    'eval' => 'required'
            ),
        ),

Files

Screenshot_23.png (1.52 KB) Screenshot_23.png Moritz Ahl, 2014-07-10 18:50

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Feature #60908: Provide Evaluation of TCA select fieldsNew2014-08-12

Actions
Actions #1

Updated by Markus Klein over 10 years ago

Did you check if this is also a problem on 6.2?

Actions #2

Updated by Moritz Ahl almost 10 years ago

Yes, the Issue is still the same on 6.2.6. eval=required has no effect at all.

Actions #3

Updated by Markus Klein almost 10 years ago

  • Status changed from New to Accepted
Actions #4

Updated by Benni Mack almost 10 years ago

  • Status changed from Accepted to Needs Feedback

Eval does not exist for select fields. However, what you're missing is a field to choose a non-empty value.

I suggest you use a multi-select with two selects (similar to fe_group in pages) where you can only select one item).

Actions #5

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF