### Install lia_multicolumnwizard with composer require Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Installation/Index.html Use this command in a Composer-based TYPO3 installation to install the extension. It is the recommended installation method. ```bash composer require lia/lia_multicolumnwizard ``` -------------------------------- ### Icons.json example for IconFactory Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Example JSON file listing icon names and their SVG files. The IconFactory creates an icon selection from these entries. ```json [ {"name":"arrow-down","file":"arrow-down.svg"}, {"name":"book","file":"book.svg"}, {"name":"car","file":"car.svg"}, {"name":"chevron-down","file":"chevron-down.svg"}, {"name":"chevron-right","file":"chevron-right.svg"}, {"name":"cloud-download","file":"cloud-download.svg"}, {"name":"comment-alt-exclamation","file":"comment-alt-exclamation.svg"}, {"name":"comment-alt","file":"comment-alt.svg"}, {"name":"compass","file":"compass.svg"}, {"name":"dollar-sign","file":"dollar-sign.svg"}, {"name":"envelope","file":"envelope.svg"}, {"name":"euro","file":"euro.svg"}, {"name":"external-link","file":"external-link.svg"}, {"name":"fax","file":"fax.svg"}, {"name":"hands-helping","file":"hands-helping.svg"}, {"name":"leaf","file":"leaf.svg"}, {"name":"map-marker-alt-solid","file":"map-marker-alt-solid.svg"}, {"name":"map-marker-alt","file":"map-marker-alt.svg"}, {"name":"paper-plane","file":"paper-plane.svg"}, {"name":"phone","file":"phone.svg"}, {"name":"swatchbook","file":"swatchbook.svg"}, {"name":"tasks","file":"tasks.svg"}, {"name":"user-headset","file":"user-headset.svg"}, {"name":"users","file":"users.svg"}, {"name":"video","file":"video.svg"}, {"name":"wrench","file":"wrench.svg"} ] ``` -------------------------------- ### Example output of mcwArray Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/ViewHelper/LiaMultiColumnWizard/GetMultiColumnWizardValues.html Shows the structure of the array returned by the ViewHelper when `associative` is true. The output is a PHP array with field names as keys. ```php array(3) { 'field1' => 'value', 'field2' => 'value', 'field3' => 'value', } ``` -------------------------------- ### Database table setup for multiColumnWizard Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Create the database field 'multicolumnwizard' as mediumtext in your extension's ext_tables.sql. This field stores the wizard rows as a JSON string. ```sql CREATE TABLE tx_yourextension_domain_model_item ( multicolumnwizard mediumtext, ); ``` -------------------------------- ### Example usage of backend.getSelectValues ViewHelper Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/ViewHelper/LiaMultiColumnWizard/Backend/GetSelectValues.html Use this ViewHelper in the backend context to retrieve select values. It accepts a configuration JSON string and an optional optionsFunction array. In non-backend contexts, it returns the configuration array directly. ```xml ``` -------------------------------- ### Usage in a condition with Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/ViewHelper/LiaMultiColumnWizard/IsEmpty.html Use this ViewHelper in a condition to check if the MultiColumnWizard field is empty. The 'json' argument must be the MultiColumnWizard-json string. The example negates the result with '!' to display content when the field is not empty. ```html ``` -------------------------------- ### backend.getSelectValues ViewHelper Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/ViewHelper/LiaMultiColumnWizard/Backend/GetSelectValues.html Retrieves select values from a MultiColumnWizard configuration or a callable function. In backend context, it can call a method to get values dynamically; otherwise it returns the configuration array. ```APIDOC ## ViewHelper: backend.getSelectValues ### Description Retrieves select values from a MultiColumnWizard configuration or a callable function. In backend context, it can call a method to get values dynamically; otherwise it returns the configuration array. ### Usage ``` ``` ### Arguments #### configuration - **Type**: string - **Required**: Yes - **Description**: The JSON string of the MultiColumnWizard field. #### optionsFunction - **Type**: string - **Required**: Yes - **Description**: This array has to contain the full classname, the method to call and all the parameters needed to call this method. ### Context This ViewHelper can be used in the backend context only. In all other contexts it will just return the configuration array. ``` -------------------------------- ### Accessing array values in Fluid Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/ViewHelper/LiaMultiColumnWizard/GetMultiColumnWizardValues.html Use this Fluid snippet to access a value from the array created by the ViewHelper. The example outputs the value of `field1`. ```fluid {mcwArray.field1} ``` -------------------------------- ### Link field example for multiColumnWizard Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Configure a link field in the TCA and reference it in the multiColumnWizard's 'linkUseField' attribute. The hidden link field must be added to 'showitem' to be rendered in the form, otherwise the link wizard will not be shown. ```php $ctype = &$GLOBALS['TCA']['tt_content']['types']['lia_ctypes_mcw_test']; $ctype['columnsOverrides']['multicolumnwizard']['config']['columnFields'] = [ 'exampleMultiColumnWizardLinkInput' => [ 'divClass' => 'col-sm-2', 'type' => 'link', 'label' => 'Link', 'linkUseField' => 'fieldname_hidden_link_field', ], ]; // the hidden link field for exampleMultiColumnWizardLinkInput $ctype['columnsOverrides']['fieldname_hidden_link_field'] = [ 'exclude' => 1, 'label' => 'Link', 'config' => [ 'type' => 'link', ] ]; $ctype['types'][1]['showitem'] = '... , tx_lia_multicolumnwizard, fieldname_hidden_link_field, ...'; ``` -------------------------------- ### TCA field configuration with minitems and maxitems for row limits Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/_sources/Configuration/Index.rst.txt TCA field configuration example for limiting the number of rows. The 'minitems' and 'maxitems' options behave like their counterparts on native TCA types inline, select, and group, both defaulting to 0 meaning no limit. ```php 'multicolumnwizard' => [ 'exclude' => 1, 'label' => 'Buttons', 'config' => [ 'type' => 'user', 'renderType' => 'multiColumnWizard', 'minitems' => 0, 'maxitems' => 4, 'columnFields' => [ // ... ], ], ], ``` -------------------------------- ### Using getMultiColumnWizardValues to parse JSON into an array Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/ViewHelper/LiaMultiColumnWizard/GetMultiColumnWizardValues.html Use this Fluid snippet to parse the multicolumnwizard JSON string into an array. The field data is found in `data.multicolumnwizard`. The `associative` argument is set to true to get an associative array. ```fluid ` ``` -------------------------------- ### Configure columnFields with showLabelAboveField and optionsFunction Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Shows how to configure columnFields for the multicolumnwizard, including the showLabelAboveField option to display labels above fields, and the use of optionsFunction to generate selection options dynamically. The function must return an array, otherwise an exception is thrown. The first parameter is the complete class name, the second is the function name followed by an array of parameters. ```php $tca_columns['tx_lia_multicolumnwizard']['config']['columnFields'] = [ 'fieldName_1' => [ 'divClass' => 'col-sm-2', 'type' => 'text', 'label' => 'Textxfield' 'showLabelAboveField' => true, 'max' => 40, 'min' => 3, ], 'fieldName_2' => [ 'divClass' => 'col-sm-2', 'type' => 'textarea', 'label' => 'Textarea', 'showLabelAboveField' => true, 'cols' => 40, 'rows' => 5 'max' => 500, ], 'fieldName_3' => [ 'divClass' => 'col-sm-2', 'type' => 'checkbox', 'label' => 'Checkbox' ], 'fieldName_4' => [ 'divClass' => 'col-sm-2', 'type' => 'select', 'label' => 'Select', 'options' => [ 'value' => 'name', 'value2' => 'name2', 'value3' => 'name3', 'value4' => 'name4', 'value5' => 'name5' ] ], 'fieldName_5' => [ 'divClass' => 'col-sm-2', 'label' => 'Icon', 'type' => 'select', 'options' => '', 'optionsFunction' => [LIA\LiaMulticolumnwizard\Utilities\IconFactory::class . '->getIcons', ['iconPath' => 'EXT:your_extension/Resources/Public/Icons.json']], ], 'fieldName_6' => [ 'divClass' => 'col-sm-2', 'label' => 'Reference', 'type' => 'select', 'options' => '', 'optionsFunction' => [LIA\LiaMulticolumnwizard\Utilities\ReferenceFactory::class . '->getReference', ['tableName' => 'pages', 'valueField' => 'uid', 'outputNameField' => 'title']], ], 'fieldName_7' => [ 'divClass' => 'col-sm-2', 'label' => 'Languages', 'type' => 'select', 'options' => '', 'optionsFunction' => [LIA\LiaMulticolumnwizard\Utilities\TCAFactory::class . '->getAvailableLanguagesForAllSites'], ], 'fieldName_8' => [ 'divClass' => 'col-sm-2', 'type' => 'link', 'label' => 'Link', 'linkUseField' => 'fieldname_hidden_link_field', ], ]; $tca_columns['fieldname_hidden_link_field'] = [ 'exclude' => 1, 'label' => 'Hidden link field for the link wizard of fieldName_8', 'config' => [ 'type' => 'link', ] ]; $overrideChildTca['types'][1]['showitem'] = '... ,tx_lia_multicolumnwizard, fieldname_hidden_link_field, ...'; ``` -------------------------------- ### Inline namespace import for MultiColumnWizard ViewHelpers Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/FAQ/Index.html Use this line in the template before using any MultiColumnWizard ViewHelper. This is the inline method for importing the namespace. ```Fluid {namespace mcw=LIA\LiaMulticolumnwizard\ViewHelpers} ``` -------------------------------- ### Import MultiColumnWizard ViewHelper namespace (Tag-Attribute and Inline) Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/_sources/FAQ/Index.rst.txt Two ways to import the MultiColumnWizard ViewHelper namespace. The first adds the namespace to the root HTML tag of a Fluid template; the second uses the inline namespace declaration in TypoScript. Both are required before using any MultiColumnWizard ViewHelper. ```html
``` ```typoscript {namespace mcw=LIA\LiaMulticolumnwizard\ViewHelpers} ``` -------------------------------- ### Import MultiColumnWizard namespace in HTML tag attribute Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/FAQ/Index.html Add the mcw namespace to the opening html tag of the template. This is the tag-attribute method for importing the MultiColumnWizard ViewHelper namespace. ```HTML
``` -------------------------------- ### Override backend template path via TSConfig Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html To override the partial for text-input, place a Partials into the directory `extensions/your_extension/Resources/Private/Backend/Partials/Fields/text.html` and define this in your TSConfig. The TSConfig key is `templates.lia/lia_multicolumnwizard.1721919321`. ```tsconfig templates.lia/lia_multicolumnwizard.1721919321 = your_vendor/your_extension:Resources/Private/Extensions/LiaMulticolumnWizard/Backend ``` -------------------------------- ### Column length options for text and textarea columns Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Configures a text column with character limits. max renders as maxlength, stopping browser input; text columns default to 255, textarea columns stay uncapped unless max is set. min renders as minlength and is additionally checked in JavaScript because FormEngine submits the form itself, bypassing browser validation. Empty fields are never flagged; use minitems to require rows. ```php 'exampleMultiColumnWizardTextInput' => [ 'divClass' => 'col-sm-2', 'type' => 'text', 'label' => 'Textfield', 'max' => 40, 'min' => 3, ], ``` -------------------------------- ### Model property, getter and setter for multiColumnWizard Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Add a string property with getter and setter to your domain model. The property stores the JSON string from the wizard. The getter returns the JSON string, the setter accepts a string. ```php /** * multicolumnwizard * * @var string */ protected string $multicolumnwizard = ''; [...] /** * Returns the multicolumnwizard list (as json) * * @return string */ public function getMulticolumnwizard(): string { return $this->multicolumnwizard; } /** * Sets the multicolumnwizard * * @param string $multicolumnwizard * @return void */ public function setMulticolumnwizard(string $multicolumnwizard): void { $this->multicolumnwizard = $multicolumnwizard; } ``` -------------------------------- ### showLabelAboveField option usage Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/_sources/Configuration/Index.rst.txt Shows the option 'showLabelAboveField' => true to display the label above the field in every row of the multicolumnwizard. ```php 'showLabelAboveField' => true ``` -------------------------------- ### TCA field configuration with minitems and maxitems Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Configures a multicolumnwizard field with row limits. minitems and maxitems behave like their native TCA counterparts, defaulting to 0 (no limit). maxitems counts rows and disables the 'Create new record' button when reached; minitems counts filled rows, with a single untouched row counting as zero. Violations block saving and raise the standard 'fields missing' modal, but limits are not enforced by the DataHandler. minitems must not exceed maxitems and both must be non-negative integers, otherwise an InvalidOptionValueException is thrown. ```php 'multicolumnwizard' => [ 'exclude' => 1, 'label' => 'Buttons', 'config' => [ 'type' => 'user', 'renderType' => 'multiColumnWizard', 'minitems' => 0, 'maxitems' => 4, 'columnFields' => [ // ... ], ], ], ``` -------------------------------- ### TCA field configuration with softref multiColumnWizardTypolink Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html Configure a multiColumnWizard field with the soft reference parser 'multiColumnWizardTypolink' to index links. Run 'typo3 referenceindex:update' afterwards to index existing records. All link types supported by the typolink parser are covered, including page and record links. ```php 'multicolumnwizard' => [ 'exclude' => 1, 'label' => 'Buttons', 'config' => [ 'type' => 'user', 'renderType' => 'multiColumnWizard', 'softref' => 'multiColumnWizardTypolink', 'columnFields' => [ // ... ], ], ], ``` -------------------------------- ### mwc:isEmpty ViewHelper Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/ViewHelper/LiaMultiColumnWizard/IsEmpty.html Checks if the given MultiColumnWizard field has any values. Returns true if every value in every row is empty. ```APIDOC ## mwc:isEmpty ViewHelper ### Description Checks if the given MultiColumnWizard field has any values. Checks every field in every row and returns true if every value is empty. ### Usage Use in a Fluid condition to check if the MultiColumnWizard field is empty. ### Arguments #### json - **Type**: string - **Required**: 1 - **Description**: The MultiColumnWizard-json string. ### Example ``` ``` ``` -------------------------------- ### TCA field configuration for multicolumn wizard Source: https://docs.typo3.org/p/lia/lia_multicolumnwizard/main/en-us/Configuration/Index.html TCA configuration for the multicolumn wizard on parent elements. Defines the 'multicolumnwizard' field with renderType 'multiColumnWizard' and a 'columnFields' array containing various column types (text, textarea, checkbox, select, link) with options like 'divClass', 'max', 'min', 'optionsFunction', and 'linkUseField'. Also includes a hidden link field 'fieldname_hidden_link_field' used by the link wizard. ```php 'multicolumnwizard' => [ 'exclude' => 1, 'label' => 'MulticolumnField', 'config' => [ 'type' => 'user', 'renderType' => 'multiColumnWizard', 'softref' => 'multiColumnWizardTypolink', 'minitems' => 0, 'maxitems' => 4, 'columnFields' => [ 'exampleMultiColumnWizardTextInput' => [ 'divClass' => 'col-sm-2', 'type' => 'text', 'label' => 'Textfield' 'showLabelAboveField' => true, 'max' => 40, 'min' => 3, ], 'exampleMultiColumnWizardTextareaInput' => [ 'divClass' => 'col-sm-2', 'type' => 'textarea', 'label' => 'Textarea', 'cols' => 40, 'rows' => 5 'showLabelAboveField' => true, 'max' => 500, ], 'exampleMultiColumnWizardCheckbox' => [ 'divClass' => 'col-sm-2', 'type' => 'checkbox', 'label' => 'Checkbox' ], 'exampleMultiColumnWizardSelect' => [ 'divClass' => 'col-sm-2', 'type' => 'select', 'label' => 'Select', 'options' => [ 'value' => 'name', 'value2' => 'name2', 'value3' => 'name3', 'value4' => 'name4', 'value5' => 'name5' ] ], 'exampleMultiColumnWizardSelectIcon' => [ 'divClass' => 'col-sm-2', 'label' => 'Icon', 'type' => 'select', 'options' => '', 'optionsFunction' => [LIA\LiaMulticolumnwizard\Utilities\IconFactory::class . '->getIcons', ['iconPath' => 'EXT:your_extension/Resources/Public/Icons.json']], ], 'exampleMultiColumnWizardReference' => [ 'divClass' => 'col-sm-2', 'label' => 'Reference', 'type' => 'select', 'options' => '', 'optionsFunction' => [LIA\LiaMulticolumnwizard\Utilities\ReferenceFactory::class . '->getReference', ['tableName' => 'pages', 'valueField' => 'uid', 'outputNameField' => 'title']], ], 'exampleMultiColumnWizardLanguage' => [ 'divClass' => 'col-sm-2', 'label' => 'Languages', 'type' => 'select', 'options' => '', 'optionsFunction' => [LIA\LiaMulticolumnwizard\Utilities\TCAFactory::class . '->getAvailableLanguagesForAllSites'], ], 'exampleMultiColumnWizardLinkInput' => [ 'divClass' => 'col-sm-2', 'type' => 'link', 'label' => 'Link', 'linkUseField' => 'fieldname_hidden_link_field', ], ] ] ], 'fieldname_hidden_link_field' = [ 'exclude' => 1, 'label' => 'Hidden link field used by the link wizard of exampleMultiColumnWizardLinkInput', 'config' => [ 'type' => 'link', ] ]; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.