PHPackages                             heimrichhannot/contao-fieldpalette-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. heimrichhannot/contao-fieldpalette-bundle

ActiveContao-bundle[Admin Panels](/categories/admin)

heimrichhannot/contao-fieldpalette-bundle
=========================================

FieldPalette is a contao widget like MultiColumnWizard with its own database table.

0.7.18(4mo ago)715.8k↓51%[1 issues](https://github.com/heimrichhannot/contao-fieldpalette-bundle/issues)8LGPL-3.0-or-laterPHPPHP ^8.1

Since Mar 21Pushed 4mo ago6 watchersCompare

[ Source](https://github.com/heimrichhannot/contao-fieldpalette-bundle)[ Packagist](https://packagist.org/packages/heimrichhannot/contao-fieldpalette-bundle)[ Docs](https://github.com/heimrichhannot/contao-fieldpalette-bundle)[ RSS](/packages/heimrichhannot-contao-fieldpalette-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (48)Versions (73)Used By (8)

Contao FieldPalette bundle
==========================

[](#contao-fieldpalette-bundle)

[![](https://camo.githubusercontent.com/9b88f738d62b3b8edde7a0beb24d347f2f4d647968c5c4a67d24624ba376e0d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d6669656c6470616c657474652d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-fieldpalette-bundle)[![](https://camo.githubusercontent.com/672d89852389d30f135bfee09221be962a85d9ba69dbe667e58353aa926e601f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d6669656c6470616c657474652d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-fieldpalette-bundle)

> If you're in search of an multi column input field and the storage of values in another table isn't an explicit requirement, we recommend to use [Multi Column Editor Bundle](https://github.com/heimrichhannot/contao-multi-column-editor-bundle) instead, as it has less possible side effects and is more often updated due it's higher usage.

FieldPalette is a contao widget similar to [MultiColumnWizard](https://github.com/menatwork/MultiColumnWizard). Unlike MultiColumnWizard, fields are stored flatly into `tl_fieldpalette` table and synced with its parent field.

The fieldpalette configuration is based on Contao's [Data Container Arrays](https://docs.contao.org/books/api/dca/index.html).

[![alt fieldpalette wizard](./docs/img/fieldpalette_wizard.jpg)](./docs/img/fieldpalette_wizard.jpg)*FieldPalette Wizard - ListView*

[![alt fieldpalette edit](./docs/img/fieldpalette_edit.jpg)](./docs/img/fieldpalette_edit.jpg)*FieldPalette Wizard - Edit item*

Technical instructions
----------------------

[](#technical-instructions)

### Install

[](#install)

```
composer require heimrichhannot/contao-fieldpalette-bundle

```

You need to updated the contao database updated.

### Getting started

[](#getting-started)

FieldPalette comes with an custom input type `fieldpalette`. The configuration for this input type is done in the `fieldpalette` index of the field configuration array. You can customize your fieldpalette nearly as an "normal" dca configuration. When you finished setting up your fieldpalette input, you need to call the contao database tool to add the new fields to the table. See following example for a real world use case:

#### Default Setup (`tl_fieldpalette` table)

[](#default-setup-tl_fieldpalette-table)

This example shows the setup of an fieldpalette field within tl\_news by using it within an subpalette. That (shortend) example is available within the module [Contao News Leisure Bundle](https://github.com/heimrichhannot/contao-news-leisure-bundle).

```
# contao/dca/tl_news.php

$GLOBALS['TL_DCA']['tl_news']['fields']['venues'] = [
    'inputType' => 'fieldpalette',
    'foreignKey' => 'tl_fieldpalette.id',
    'relation' => ['type' => 'hasMany', 'load' => 'eager'],
    'sql' => "blob NULL",
    'fieldpalette' => [
        'config' => [
            'hidePublished' => false
        ],
        'list' => [
            'label' => [
                'fields' => ['venueName', 'venueStreet', 'venuePostal', 'venueCity'],
                'format' => '%s [%s, %s %s]',
            ],
        ],
        'palettes' => [
            'default' => 'venueName,venueStreet,venuePostal,venueCity',
        ],
        'fields' => [
            'venueName' => [
                'label' => &$GLOBALS['TL_LANG']['tl_news']['venueName'],
                'exclude' => true,
                'search' => true,
                'inputType' => 'text',
                'eval' => ['maxlength' => 255, 'tl_class' => 'long'],
                'sql' => "varchar(255) NOT NULL default ''",
            ],
            'venueStreet' => [
                'label' => &$GLOBALS['TL_LANG']['tl_news']['venueStreet'],
                'exclude' => true,
                'search' => true,
                'inputType' => 'text',
                'eval' => ['maxlength' => 255, 'tl_class' => 'w50'],
                'sql' => "varchar(255) NOT NULL default ''",
            ],
            'venuePostal' => [
                'label' => &$GLOBALS['TL_LANG']['tl_news']['venuePostal'],
                'exclude' => true,
                'search' => true,
                'inputType' => 'text',
                'eval' => ['maxlength' => 32, 'tl_class' => 'w50'],
                'sql' => "varchar(32) NOT NULL default ''",
            ],
            'venueCity' => [
                'label' => &$GLOBALS['TL_LANG']['tl_news']['venueCity'],
                'exclude' => true,
                'filter' => true,
                'search' => true,
                'sorting' => true,
                'inputType' => 'text',
                'eval' => ['maxlength' => 255, 'tl_class' => 'w50'],
                'sql' => "varchar(255) NOT NULL default ''",
            ],
        ],
    ],
];
```

Developers
----------

[](#developers)

### Guides

[](#guides)

[DCA reference](docs/developers/dca_reference.md)
[Custom table set up](docs/developers/custom_table.md)
[Working with fieldpalette records](/docs/developers/fieldpalette_records.md) (copying (parent) records)

### Working with fieldpalette model

[](#working-with-fieldpalette-model)

The `FieldPaletteModel` is not intended to be called directly and all custom methods are non static. We recommend to use the `huh.fieldpalette.manager` service.

Example:

```
/**
 * @var ContainerInterface $container
 */

// Return a model instance (with default table) for usage with model method (like find methods)
$container->get('huh.fieldpalette.manager')->getInstance()->findByPidAndTableAndField($item->id, 'tl_item', 'parentItem');

// Return a new model instance
$container->get('huh.fieldpalette.manager')->createModel()->findByPidAndTableAndField($item->id, 'tl_item', 'parentItem');

// Return a new model instance with custom table
$container->get('huh.fieldpalette.manager')->createModelByTable('tl_my_custom_table')->findByPidAndTableAndField($item->id, 'tl_item', 'parentItem');
```

Default model methods are still callable static. Custom method can also be called by creating a new model instance.

### Widgets

[](#widgets)

NameDescriptionfieldpaletteThe FieldPaletteWizard renders the tl\_fieldpalette items and provide crud functionality within its parent record (e.g. tl\_news).### Fields

[](#fields)

tl\_fieldpalette:

NameDescriptionidautoincrement unique identifierepidid of the parent entryptableparent table name (e.g. tl\_news)pfieldparent field name (e.g. tl\_news.venues)sortingthe sorting valuepublishedthe published state (1 = published)starttimestamp from where the element is publishedstoptimestamp until the element is published### Form Callbacks

[](#form-callbacks)

tl\_fieldpalette:

TypeDescriptiononcreate\_callbackGet fieldpalette key from request, check if the parent table is active within Fieldpalette Registry and set the pfield to tl\_fieldpalette item.onsubmit\_callbackUpdate/Sync parent fieldpalette item value (for example tl\_news.venues) when tl\_fieldpalette entries were updated.oncut\_callbackUpdate/Sync parent fieldpalette item value (for example tl\_news.venues) when tl\_fieldpalette entries were sorted.ondelete\_callbackUpdate/Sync parent fieldpalette item value (for example tl\_news.venues) when tl\_fieldpalette entries were deleted.### Hooks

[](#hooks)

NameArgumentsDescriptionloadDataContainer$strTableRegister fields from parent datacontainer (like tl\_news) to tl\_fieldpalette and disable fieldpalette support from back end modules where no fieldpalette fields exists (see: initializeSystem Hook).initializeSystem-Enable tl\_fieldpalette table within all back end modules.executePostActions$strAction, DataContainer $dcAdd refreshFieldPaletteField ajax action that return the updated FieldPaletteWizard content.Restrictions
------------

[](#restrictions)

- only supports DC\_Table DataContainers

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance72

Regular maintenance activity

Popularity29

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~3 days

Total

71

Last Release

142d ago

Major Versions

0.6.18 → 1.0.0-beta12024-03-05

PHP version history (4 changes)0.1.0PHP ~7.1

0.5.4PHP ~7.1|^8.0

1.0.0-beta1PHP ^8.1

0.7.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ad3224d8727b622ebd229840eea6b9dbcb83eb0bd609e6ce65b614830ff538?d=identicon)[digitales@heimrich-hannot.de](/maintainers/digitales@heimrich-hannot.de)

---

Top Contributors

[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (110 commits)")[![ericges](https://avatars.githubusercontent.com/u/25957923?v=4)](https://github.com/ericges "ericges (3 commits)")[![vvohh](https://avatars.githubusercontent.com/u/75325799?v=4)](https://github.com/vvohh "vvohh (2 commits)")

---

Tags

contaofieldpalettefieldgroup

###  Code Quality

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/heimrichhannot-contao-fieldpalette-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/heimrichhannot-contao-fieldpalette-bundle/health.svg)](https://phpackages.com/packages/heimrichhannot-contao-fieldpalette-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M430](/packages/easycorp-easyadmin-bundle)[contao-community-alliance/dc-general

Universal data container for Contao

1581.4k93](/packages/contao-community-alliance-dc-general)[shopware/storefront

Storefront for Shopware

674.7M286](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M674](/packages/shopware-core)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
