Issue Bug Closed

#69490New FormEngineValidation breaks the multiple selection for renderMode 'singlebox'

Stefan Berger 09/03/15, 09:06 updated 10/19/17, 21:52

Description

I use a simple select TCA form element configured to be multiple selected.

Here an example TCA:

return array(
    'columns' => array(
        'type' => array(
            'exclude' => 1,
            'label' => 'type',
            'config' => array (
                'type' => 'select',
                'multiple' => 1,
                'size' => 7,
                'minitems' => 0,
                'maxitems' => 7,
                'renderMode' => 'singlebox',
                'items' => array (
                    array('type.1', '1'),
                    array('type.2', '2'),
                    array('type.3', '3'),
                    array('type.4', '4'),
                    array('type.5', '5'),
                    array('type.6', '6'),
                    array('type.7', '7'),
                ),
            )
        ),
    ),
)

When I select more than one option all options will be deselected. This behavior also exists on loading the form element, when more the one option should be preselected.

Quick debuggings shows in typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js that calling the function FormEngineValidation.validate() in FormEngineValidation.initialize and FormEngineValidation.registerReady will lead to that mentioned problem.

Commenting out the code in FormEngineValidation.validate will solve the problem, but of course that’s not the solution.

Reviews 1