Search by

hschottm / contao-multitextwizard

hschottm

contao-multitextwizard is a backend widget that can be used to add an array of text input fields to Contao backend forms.

Package info

github.com/hschottm/MultiTextWizard

Type:contao-bundle

pkg:composer/hschottm/contao-multitextwizard

Statistics

Installs: 521

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 1

1.4.2 2026-10-28 11:23 UTC

This package is auto-updated.

Last update: 2026-11-01 12:03:21 UTC


README

Latest Version on Packagist Installations via composer per month Installations via composer total

contao-multitextwizard

Contao backend widget for text list input

contao-multitextwizard is a backend widget that can be used to add and edit an array of text input fields to Contao backend forms.

multitextwizard

Use in the data container array (DCA)

'authors' => array
(
  'label'                   => &$GLOBALS['TL_LANG']['tl_extension']['authors'],
  'inputType'               => 'multitextWizard',
  'save_callback'           => array(array('tl_extension', 'saveAuthors')),
  'load_callback'           => array(array('tl_extension', 'loadAuthors')),
  'eval'                    => 
    array(
      'mandatory' => false, 
      'doNotSaveEmpty'=>true, 
      'style' => 'width: 100%;', 
      'columns' => array
      (
        array
        (
          'label' => &$GLOBALS['TL_LANG']['tl_extension']['firstname'],
          'width' => '180px'
        ),
        array
        (
          'label' => &$GLOBALS['TL_LANG']['tl_extension']['lastname'],
        )
      ),
      'buttonTitles' => array(
        'rnew' => $GLOBALS['TL_LANG']['tl_extension']['buttontitle_author_new'], 
        'rcopy' => $GLOBALS['TL_LANG']['tl_extension']['buttontitle_author_copy'], 
        'rdelete' => $GLOBALS['TL_LANG']['tl_extension']['buttontitle_author_delete']
      )
    ),
  'sql'                     => "blob NULL"
),

The Contao Manager registers the bundle and the multitextWizard input type automatically. After adding a field that requires a database column, update the database using the Contao Manager or vendor/bin/contao-console contao:migrate.

The widget stores rows with zero-based column indexes. The columns option accepts a column-definition array or a positive column count; labels can supply separate labels. Column options include label, name (CSS class), mandatory, rgxp, unique, maxlength, width and style. Explicit column settings override global defaults.

Release history

Contao 5.7 support

  • Added support for Contao 5.7 and PHP 8.3 or newer.
  • Preserved the multitextWizard input type and existing stored values.
  • Migrated rendering to Twig, with escaped values, labels, button titles and error messages.
  • Updated row controls to work after backend navigation and keep field names and IDs synchronized.
  • Changed row editing so that changes are saved only when the backend form is submitted.
  • Improved column validation: explicit settings take precedence regardless of option order, and uniqueness is checked after value normalization.
  • Retained custom buttonTitles with German and English defaults.
  • Updated row action icons to locally bundled SVGs.

Updating existing installations

Custom .html5 template overrides must be converted to Twig. The supplied template is be_multitext.html.twig. JavaScript must be enabled to edit rows.

Credits

Row action icons are from Lucide 0.468.0. License notices are included in src/Resources/public/icons/lucide/LICENSE.

License

This extension is licensed under the GNU Lesser General Public License, version 3 or (at your option) any later version (LGPL-3.0-or-later). See LICENSE.

Bundled third-party assets retain their respective licenses and copyright notices.