heimrichhannot/contao-field-value-copier-bundle

This simple module offers a backend dca input type for showing a giving the user the opportunity to copy a certain dca's field value from one record to another in Contao CMS.

Package info

github.com/heimrichhannot/contao-field-value-copier-bundle

Type:contao-bundle

pkg:composer/heimrichhannot/contao-field-value-copier-bundle

Statistics

Installs: 8 396

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

1.4.3 2025-06-25 12:31 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

LGPL-3.0-or-later 7940f6d70eb43ab01a4c136e7278cee4ed43e89b

This package is auto-updated.

Last update: 2026-06-25 14:45:52 UTC


README

This simple module offers a backend dca input type for showing a giving the user the opportunity to copy a certain dca's field value from one record to another in Contao CMS. This is useful for fields that are very complex to configure.

👁 Demo in the backend

Features

Technical instructions

Add the following to the relevant DCA:

'complexFieldCopier' => [
 // no label necessary
 'inputType' => 'fieldValueCopier',
 'eval' => [
 'fieldValueCopier' => [
 'table' => 'tl_my_dca',
 'field' => 'complexField',
 'config' => [
 // here all available config parameters found in \HeimrichHannot\UtilsBundle\Choice\ModelInstanceChoice::collect() are possible
 'labelPattern' => '%title% (ID %id%)' // all of the dca's fields can be used here
 ],
 'options_callback' => ['huh.field_value_copier.util.field_value_copier_util', 'getOptions']
 ]
 ]
],
'complexField' => [
 // ...
]