Examples¶
Simple select drop down with static and database values¶

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php¶
[
'columns' => [
'select_single_3' => [
'label' => 'select_single_3 static values, dividers, foreign_table_where',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
[
'label' => 'Static values',
'value' => '--div--',
],
[
'label' => 'static -2',
'value' => -2,
],
[
'label' => 'static -1',
'value' => -1,
],
[
'label' => 'DB values',
'value' => '--div--',
],
],
'foreign_table' => 'tx_styleguide_staticdata',
'foreign_table_where' => 'AND {#tx_styleguide_staticdata}.{#value_1} LIKE \'%foo%\' ORDER BY uid',
'foreign_table_prefix' => 'A prefix: ',
],
],
],
]
Select foreign rows with icons¶

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php¶
[
'columns' => [
'select_single_12' => [
'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,
],
],
],
],
],
]
Select a single value from a list of elements¶

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php¶
[
'columns' => [
'select_single_10' => [
'label' => 'select_single_10 size=6, three options',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
[
'label' => 'foo 1',
'value' => 1,
],
[
'label' => 'foo 2',
'value' => 2,
],
[
'label' => 'a divider',
'value' => '--div--',
],
[
'label' => 'foo 3',
'value' => 3,
],
],
'size' => 6,
],
],
],
]