Input

type='input' generates a html <input> field with the type attribute set to text. It is possible to apply additional features such as the valuePicker.

In the database, this field is typically set to a VARCHAR or CHAR field with appropriate length.

Deprecated since version 12.0

The following render types have been deprecated:

  • renderType=inputDateTime: Use the TCA type datetime instead.
  • renderType=colorpicker: Use the TCA type color instead.
  • renderType=inputLink: Use the TCA type link instead.

Examples

Simple input field

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php
[
    'columns' => [
        'input_1' => [
            'l10n_mode' => 'prefixLangTitle',
            'label' => 'input_1 description',
            'description' => 'field description',
            'config' => [
                'type' => 'input',
                'behaviour' => [
                    'allowLanguageSynchronization' => true,
                ],
            ],
        ],
    ],
]
Copied!

Input with placeholder and null handling

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php
[
    'columns' => [
        'input_28' => [
            'label' => 'input_28',
            'description' => 'placeholder=__row|input_26 mode=useOrOverridePlaceholder nullable=true default=null',
            'config' => [
                'type' => 'input',
                'placeholder' => '__row|input_26',
                'nullable' => true,
                'default' => null,
                'mode' => 'useOrOverridePlaceholder',
            ],
        ],
    ],
]
Copied!

Value picker

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php
[
    'columns' => [
        'input_33' => [
            'label' => 'input_33',
            'description' => 'valuePicker',
            'config' => [
                'type' => 'input',
                'size' => 20,
                'eval' => 'trim',
                'valuePicker' => [
                    'items' => [
                        [
                            'spring',
                            'Spring',
                        ],
                        [
                            'summer',
                            'Summer',
                        ],
                        [
                            'autumn',
                            'Autumn',
                        ],
                        [
                            'winter',
                            'Winter',
                        ],
                    ],
                ],
            ],
        ],
    ],
]
Copied!