Examples

Some examples from extension styleguide to get an idea on what the field definition is capable of: An input field with slider, a select drop-down for images, an inline relation spanning multiple tables.

The following examples all can be found in the extension styleguide.

Input field with slider

Input field with a slider, allowing integer values between -90 and 90:

      'input_30' => [ 
         'exclude' => 1,
         'label' => 'input_30 slider step=10 width=200 eval=trim,int',
         'config' => [ 
            'type' => 'input',
            'size' => 5,
            'eval' => 'trim,int',
            'range' => [ 
               'lower' => -90,
               'upper' => 90,
            ],
            'default' => 0,
            'slider' => [ 
               'step' => 10,
               'width' => 200,
            ],
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_elements_basic"

Select drop-down for records represented by images

Select field with foreign table relation and field wizard:

      'select_single_12' => [ 
         'exclude' => 1,
         'label' => 'select_single_12 foreign_table selicon_field',
         'config' => [ 
            'type' => 'select',
            'renderType' => 'selectSingle',
            'foreign_table' => 'tx_styleguide_elements_select_single_12_foreign',
            'fieldWizard' => [ 
               'selectIcons' => [ 
                  'disabled' => false,
               ],
            ],
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_elements_select"

The table tx_styleguide_elements_select_single_12_foreign is defined as follows:

[
   'ctrl' => [
      'title' => 'Form engine elements - select foreign single_12',
      'label' => 'fal_1',
      'selicon_field' => 'fal_1',
      // ...
   ],

   'columns' => [
      // ...
      'fal_1' => [
         'label' => 'fal_1 selicon_field',
         'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
            'fal_1',
            [
               'maxitems' => 1,
            ],
            $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']
         ),
      ],
   ],
   // ...

];

Inline relation (IRRE) spanning multiple tables

Inline relation to a foreign table:

      'inline_1' => [ 
         'exclude' => 1,
         'label' => 'inline_1',
         'config' => [ 
            'type' => 'inline',
            'foreign_table' => 'tx_styleguide_inline_1n1n_child',
            'foreign_field' => 'parentid',
            'foreign_table_field' => 'parenttable',
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_inline_1n1n"