---
title: "Grouping fields (palettes)"
manual: "TCA Reference"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3tca:palettes@13.4"
source: "Palettes/Index.rst"
modified: "2026-09-15T18:49:03+00:00"
---

# Grouping fields (palettes)

If editing records in the backend, all fields are usually displayed after each
other in single rows. Palettes provide a way to display multiple fields next
to each other if the browser window size allows this. They can be used to
group multiple related fields in one combined section.

Each palette has a name and can be referenced by name from within the
[\['types'\] section](https://docs.typo3.org/permalink/t3tca:types@13.4).

To modify existing palettes you can use the utility functions
`\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette` and
`ExtensionManagementUtility::addFieldsToAllPalettesOfField`.

**Table of Contents**

-   [Examples](https://docs.typo3.org/permalink/t3tca:examples@13.4)
-   [Properties of palettes section of TCA](https://docs.typo3.org/permalink/t3tca:properties-of-palettes-section-of-tca@13.4)

## Examples

The TCA of the styleguide extension provides palettes with different properties.

![](../Images/AutomaticScreenshots/Palette.png)

Palettes get defined in the section `palettes` of the tables TCA array.

The following TCA section specifies the different palettes.

**EXT:styleguide/Configuration/TCA/tx_styleguide_palette.php**

```php
[
    'palettes' => [
        'palette_1' => [
            'label' => 'palette_1',
            'description' => 'palette description',
            'showitem' => 'palette_1_1, palette_1_3',
        ],
        'palette_2' => [
            'showitem' => 'palette_2_1',
        ],
        'palette_3' => [
            'showitem' => 'palette_3_1, palette_3_2',
        ],
        'palette_4' => [
            'showitem' => 'palette_4_1, palette_4_2, palette_4_3, --linebreak--, palette_4_4',
        ],
        'palette_5' => [
            'showitem' => 'palette_5_1, --linebreak--, palette_5_2',
        ],
        'palette_6' => [
            'showitem' => 'palette_6_1',
            'isHiddenPalette' => true,
        ],
        'palette_7' => [
            'showitem' => 'palette_7_1',
        ],
    ],
]
```

The palettes then get referenced in the `types` section:

**EXT:styleguide/Configuration/TCA/tx_styleguide_palette.php**

```php
[
    'types' => [
        [
            'showitem' => '
                --div--;palette,
                    --palette--;;palette_1,
                    --palette--;palette_2;palette_2,
                    --palette--;palette_3;palette_3,
                    --palette--;;palette_4,
                    --palette--;palette_5;palette_5,
                --div--;hidden palette,
                    --palette--;palette_6;palette_6,
                    --palette--;palette_7 (palette_6 hidden);palette_7,
            ',
        ],
    ],
]
```

It is also possible to define the label of a palette directly in the palette
definition. Declaring the label in an 'palettes' array can reduce boilerplate
declarations if a palette is used over and over again in multiple types. If a
label is defined for a palette this way, it is always displayed. Setting a
specific label in the 'types' array for a palette overrides the default label
that was defined within the 'palettes' array. There is no way to unset a label
that is set within the 'palettes' array. It will always be displayed.

Example:

**EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt)**

```php
'types' => [
   'myType' => [
      'showitem' => 'aField, --palette--;;aPalette, someOtherField',
   ],
],
'palettes' => [
   'aPalette' => [
      'label' => 'LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription',
      'showitem' => 'aFieldInAPalette, anotherFieldInPalette',
   ],
],
```

## Properties of `palettes` section of TCA

-   **description**

    -   *Type:* string
    -   *Path:* $GLOBALS\['TCA'\]\[$table\]\['palettes'\]

    Allows to display a localized description text into the palette declaration.
    It will be displayed below the
    [palette label](https://docs.typo3.org/permalink/t3tca:palettes-properties-label@13.4).

    This additional help text can be used to clarify some field usages directly
    in the UI.

    > [!NOTE]
    > In contrast to the palette label, the description property can not
    > be overwritten on a record type basis.

**Example**

![](../Images/AutomaticScreenshots/PaletteDescription.png)

**EXT:styleguide/Configuration/TCA/tx_styleguide_palette.php**

```php
[
    'palettes' => [
        'palette_1' => [
            'label' => 'palette_1',
            'description' => 'palette description',
            'showitem' => 'palette_1_1, palette_1_3',
        ],
    ],
]
```

-   **isHiddenPalette**

    -   *Type:* boolean
    -   *Path:* $GLOBALS\['TCA'\]\[$table\]\['palettes'\]

    If set to true, this palette will never be shown, but the fields of the palette are technically
    rendered as hidden elements in FormEngine.

    This is sometimes useful when you want to set a field's value by JavaScript from another user-defined field.
    You can also use it along with the IRRE (TCA columns type [inline](https://docs.typo3.org/permalink/t3tca:columns-inline@13.4))
    [foreign_selector](https://docs.typo3.org/permalink/t3tca:columns-inline-properties-foreign-selector@13.4) feature if you don't want the relation
    field to be displayed (it must be technically present and rendered though, that's why you should put it to
    a hidden palette in that case).

    > [!NOTE]
    > The "isHiddenPalette" concept is more a hack than a solution in current FormEngine code. It has been
    > introduced for the "FAL" file resource handling to have virtual fields which can be handled in JavaScript
    > but are not displayed to the editor. It comes with the price of a bunch of HTML that is disabled
    > via CSS if editing those records in the backend. The core will sooner or later reconsider this solution
    > and substitute it with something more appropriate. Extension authors should stay away from this property
    > if possible to not run into upgrade troubles if that happens.

-   **label**

    -   *Type:* string
    -   *Path:* $GLOBALS\['TCA'\]\[$table\]\['palettes'\]

    Allows to display a localized label text as a dedicated entry into the palette declaration, instead as a part of
    the types configuration.
    By using the explicit label entry, code duplication upon reusing existing palettes can be reduced. The label is
    always shown with the palette, no matter where it is referenced.

    Before:

    **EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt)**

    ```php
    'types' => [
        'myType' => [
            'showitem' => 'aField, --palette--;LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription;aPalette, someOtherField',
        ],
    ],
    'palettes' => [
        'aPalette' => [
            'showitem' => 'aFieldInAPalette, anotherFieldInPalette',
        ],
    ],
    ```

    After:

    **EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt)**

    ```php
    'types' => [
        'myType' => [
            'showitem' => 'aField, --palette--;;aPalette, someOtherField',
        ],
    ],
    'palettes' => [
        'aPalette' => [
            'label' => 'LLL:EXT:myExt/Resources/Private/Language/locallang.xlf:aPaletteDescription',
            'showitem' => 'aFieldInAPalette, anotherFieldInPalette',
        ],
    ],
    ```

-   **showitem**

    -   *Type:* string (list of field names)
    -   *Path:* $GLOBALS\['TCA'\]\[$table\]\['palettes'\]
    -   *Required:* true

    Specifies which fields are displayed in which order in the palette,
    examples:

    **EXT:my_extension/Configuration/TCA/tx_myextension_table.php (Excerpt)**

    ```php
    [
        'showitem' => 'aFieldName, anotherFieldName',
        'showitem' => 'aFieldName;labelOverride, anotherFieldName',
        'showitem' => 'aFieldName, anotherFieldName, --linebreak--, yetAnotherFieldName',
    ]
    ```

    This string is a comma separated list of field names from [\['columns'\] section](https://docs.typo3.org/permalink/t3tca:columns@13.4), each field can
    optionally have a second, semicolon separated field to override the default [label](https://docs.typo3.org/permalink/t3tca:columns-properties-label@13.4)
    property of the field.

    Instead of a field name, the special keyword `--linebreak--` can be used to place groups of fields on
    single lines. Note this line grouping only works well if the browser window size allows multiple fields
    next to each other, if the width is not sufficient the fields will wrap below each other anyways.

    > [!WARNING]
    > **Caution**
    >
    > A field name must only appear once in the entire record. Do not reference
    > a single field within the [showitem](https://docs.typo3.org/permalink/t3tca:types-properties-showitem@13.4)
    > list of a types section and again in a palette used in the same type.
    > Do not use a field in multiple palettes referenced in a type, or
    > multiple times in one palette.
