Commit 7e057100 authored by spthiel's avatar spthiel Committed by Anja Leichsenring
Browse files

[FEATURE] Add `expandAll` option for renderType=selectCheckBox

The renderType `selectCheckbox` allows for grouping of items,
which are rendered as collapsed per default.

A new TCA setting now allows to define this behavior for all
groups at once. By adding the new setting `expandAll=true`,
all groups are initially expanded. If not set or set to FALSE
the current behvahiour remains and all groups are collapsed.

Releases: master
Resolves: #91859
Change-Id: I9db196a7bfa6b1399358afdc785814425a764e80

Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Tested-by: default avatarTYPO3com <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <>
parent 80cedc5f
......@@ -221,7 +221,8 @@ class SelectCheckBoxElement extends AbstractFormElement
if (is_array($group['header'])) {
$html[] = '<div id="' . $groupIdCollapsible . '" class="panel-collapse collapse" role="tabpanel">';
$expandAll = (bool)($config['appearance']['expandAll'] ?? false) ? 'in' : '';
$html[] = '<div id="' . $groupIdCollapsible . '" class="panel-collapse collapse ' . $expandAll . '" role="tabpanel">';
$checkboxId = StringUtility::getUniqueId($groupId);
$title = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.toggleall'));
.. include:: ../../Includes.txt
Feature #91859: Allow SelectCheckBox groups to be initally expanded
See :issue:`91859`
A new TCA setting `expandAll` has been added to FormEngine type `select` with
renderType `selectCheckBox`. It allows to define the initial display behavior
for grouped checkboxes.
By adding the new setting :php:`'expandAll' => true`, all select groups are
initially expanded.
Please note, that the new setting is placed in :php:`['config']['appearance']`
and is not a top level configuration key. Therefore the full path is:
.. code-block:: php
'select_checkbox' => [
'label' => 'select_checkbox - expandAll',
'config' => [
'type' => 'select',
'renderType' => 'selectCheckBox',
'appearance' => [
'expandAll' => true
'items' => [
['group 1', '--div--'],
['check 1', 1],
['check 2', 2],
['check 3', 3],
['group 2', '--div--'],
['check 4', 4],
['check 5', 5]
It's now possible to initally expand all checkbox groups. Integrators can
therefore provide their editors with all the choices at once, without
having to open each select group individually. The possibility to close each
group remains unchanged for the editor.
.. index:: TCA
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment