Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
+ added missing sql type
  • Loading branch information
SvenMeierhans authored Feb 27, 2018
1 parent 9a354fe commit 786f252
Showing 1 changed file with 57 additions and 67 deletions.
124 changes: 57 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,35 @@ Usage with columnFields
```php
<?php

$GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => array
(
'columnFields' => array
(
'ts_client_os' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_os'],
'exclude' => true,
'inputType' => 'select',
'eval' => array
(
'style' => 'width:250px',
'includeBlankOption' => true
),
'options' => array
(
'option1' => 'Option 1',
'option2' => 'Option 2',
)
),
'ts_client_browser' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('style'=>'width:180px')
),
)
)
);
$GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = [
'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => [
'columnFields' => [
'ts_client_os' => [
'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_os'],
'exclude' => true,
'inputType' => 'select',
'eval' => [
'style' => 'width:250px',
'includeBlankOption' => true,
],
'options' => [
'option1' => 'Option 1',
'option2' => 'Option 2',
],
],
'ts_client_browser' => [
'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'],
'exclude' => true,
'inputType' => 'text',
'eval' => [ 'style' => 'width:180px' ],
],
],
],
'sql' => 'blob NULL',
];

?>
```
Expand All @@ -50,17 +44,16 @@ Usage with callback
```php
<?php

$GLOBALS['TL_DCA']['tl_table']['fields']['anything'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_table']['anything'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => array
(
'mandatory' => true,
'columnsCallback' => array('Class', 'Method')
)
);
$GLOBALS['TL_DCA']['tl_table']['fields']['anything'] = [
'label' => &$GLOBALS['TL_LANG']['tl_table']['anything'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => [
'mandatory' => true,
'columnsCallback' => [ 'Class', 'Method' ],
],
'sql' => 'blob NULL',
];

?>
```
Expand All @@ -72,27 +65,24 @@ Usage with Drag and Drop
```php
<?php

$GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => array
(
$GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = [
'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => [
// add this line for a new button
'dragAndDrop' => true,
'columnFields' => array
(
'ts_client_browser' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('style'=>'width:180px')
),
)
)
);
'dragAndDrop' => true,
'columnFields' => [
'ts_client_browser' => [
'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'],
'exclude' => true,
'inputType' => 'text',
'eval' => [ 'style' => 'width:180px' ],
],
],
],
'sql' => 'blob NULL',
];

?>
```
Expand All @@ -102,4 +92,4 @@ More information
================

More information can be found in the contao wiki
http://de.contaowiki.org/MultiColumnWizard
http://de.contaowiki.org/MultiColumnWizard

0 comments on commit 786f252

Please sign in to comment.