PHPackages                             terminal42/dcawizard - 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. terminal42/dcawizard

ActiveContao-bundle

terminal42/dcawizard
====================

dcaWizard extension for Contao Open Source CMS

4.0.0(2mo ago)10370.7k—8.4%12[1 PRs](https://github.com/terminal42/contao-dcawizard/pulls)14LGPL-3.0+PHPPHP ^8.3CI failing

Since Dec 23Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/terminal42/contao-dcawizard)[ Packagist](https://packagist.org/packages/terminal42/dcawizard)[ GitHub Sponsors](https://github.com/terminal42)[ Fund](https://ko-fi.com/terminal42)[ RSS](/packages/terminal42-dcawizard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (21)Versions (43)Used By (14)

dcawizard Contao Extension
==========================

[](#dcawizard-contao-extension)

A backend widget for Contao that allows editors to manage records from a foreign database table directly within the parent record's edit form.

---

Installation
------------

[](#installation)

Install via Composer:

```
composer require terminal42/dcawizard
```

---

Basic Usage (DCA Example)
-------------------------

[](#basic-usage-dca-example)

```
'prices' => [
    'inputType'    => 'dcaWizard',
    'foreignTable' => 'tl_iso_prices',
    'eval' => [
        'fields' => ['id', 'name', 'alias'],
    ],
],
```

### Supporting both versions simultaneously

[](#supporting-both-versions-simultaneously)

If your project needs to support both Contao 5.6 and 5.7+, you can allow both major versions using a version union constraint in your `composer.json`:

```
"require": {
    "terminal42/dcawizard": "^3.0 || ^4.0"
}
```

Composer will then automatically install:

- `3.x` when the project uses Contao ≤ 5.6
- `4.x` when the project uses Contao ≥ 5.7

No code changes are needed on your end — the correct version will be resolved based on the Contao version constraint in your own `composer.json`.

If you want to support both 3.x and 4.x simultaneously with a custom template, you need to set `customTpl` dynamically at runtime rather than statically in the DCA, since the template name changed between versions. For example, you can use an [attributes callback](https://docs.contao.org/5.x/dev/reference/dca/callbacks/#fields-field-attributes)to detect the installed version and return the correct template name:

```
