textTable 

This page describes the text type with the renderType='textTable'.

The according database field is generated automatically.

The textTable render type triggers a view called "table wizard" to manage the frontend table display in the backend. It is used for the "Table" tt_content content element.

Example: Text field with renderType textTable 

The ticket prices of a conference

The ticket prices of a conference

EXT:my_extension/Configuration/TCA/Overrides/133-tx_myextension_conference-prices.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_conference', [
  'prices' => [
    'label' => 'my_extension.db:conference.prices',
    'config' => [
      'type' => 'text',
      'renderType' => 'textTable',
      'rows' => 5,
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_conference',
  'prices',
  '',
  'after:embed_code',
);
Copied!

Properties of the TCA column type text, render type textTable 

Name Type Scope
boolean Proc.
string Display / Proc.
boolean Display
array
array
array
boolean Display
string Display / Proc.
integer Display
string Display
boolean Display
integer Display
boolean Display
string Proc.
string (keyword) Display
behaviour
allowLanguageSynchronization
Type
boolean
Default
false
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['behaviour']['allowLanguageSynchronization']
Scope
Proc.

Allows an editor to select in a localized record whether the value is copied over from default or source language record, or if the field has an own value in the localization. If set to true and if the table supports localization and if a localized record is edited, this setting enables FieldWizard LocalizationStateSelector: Two or three radio buttons shown below the field input. The state of this is stored in a json encoded array in the database table called l10n_state. It tells the DataHandler which fields of the localization records should be kept in sync if the underlying default or source record changes.

EXT:my_extension/Configuration/TCA/Overrides/132-tx_myextension_conference-embed_code.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_conference', [
  'embed_code' => [
    'label' => 'my_extension.db:conference.embed_code',
    'config' => [
      'type' => 'text',
      'renderType' => 'codeEditor',
      'format' => 'html',
      'rows' => 7,
      'appearance' => [
        'lineWrapping' => true,
      ],
      'behaviour' => [
        'allowLanguageSynchronization' => true,
      ],
      'searchable' => false,
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_conference',
  'embed_code',
  '',
  'after:description',
);
Copied!
default
Type
string
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['default']
Scope
Display / Proc.

Default value set if a new record is created.

enableTabulator
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['enableTabulator']
Scope
Display
RenderType
default, textTable

Enabling this allows to use tabs in a text field. This works well together with fixed-width fonts (monospace) for code editing.

Does not apply to RTE fields.

Example: Fixed font field with tabulators enabled
The requirements of a workshop in a fixed font

The requirements of a workshop in a fixed font

EXT:my_extension/Configuration/TCA/Overrides/250-tx_myextension_talk-requirements.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_talk', [
  'requirements' => [
    'label' => 'my_extension.db:talk.requirements',
    'config' => [
      'type' => 'text',
      'rows' => 3,
      'fixedFont' => true,
      'enableTabulator' => true,
      'wrap' => 'off',
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_talk',
  'requirements',
  'workshop',
  'before:--div--;core.form.tabs:access',
);
Copied!
fieldControl

For details see fieldControl.

fieldInformation

For details see fieldInformation.

fieldWizard
defaultLanguageDifferences
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['defaultLanguageDifferences']

For details see defaultLanguageDifferences.

localizationStateSelector
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['localizationStateSelector']

For details see localizationStateSelector.

otherLanguageContent
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['otherLanguageContent']

For details see otherLanguageContent.

fixedFont
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fixedFont']
Scope
Display
RenderType
default, textTable

Enables a fixed-width font (monospace) for the text field. This is useful when using code.

Does not apply to RTE fields.

Example: Fixed font field with tabulators enabled
The requirements of a workshop in a fixed font

The requirements of a workshop in a fixed font

EXT:my_extension/Configuration/TCA/Overrides/250-tx_myextension_talk-requirements.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_talk', [
  'requirements' => [
    'label' => 'my_extension.db:talk.requirements',
    'config' => [
      'type' => 'text',
      'rows' => 3,
      'fixedFont' => true,
      'enableTabulator' => true,
      'wrap' => 'off',
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_talk',
  'requirements',
  'workshop',
  'before:--div--;core.form.tabs:access',
);
Copied!
is_in
Type
string
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['is_in']
Scope
Display / Proc.
RenderType
textTable, default

If a user-defined evaluation is used for the field (see eval), then this value will be passed as argument to the user-defined evaluation function.

Does not apply to RTE fields.

max
Type
integer
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['max']
Scope
Display
RenderType
textTable, default

Adds the HTML5 attribute "maxlength" to a textarea. Prevents the field from adding more than specified number of characters. This is a client side restriction, no server side length restriction is enforced.

Does not apply for RTE fields.

Example: Textarea with a maximum of 30 characters
The short biography of a speaker

The short biography of a speaker

EXT:my_extension/Configuration/TCA/Overrides/331-tx_myextension_speaker-short_bio.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_speaker', [
  'short_bio' => [
    'label' => 'my_extension.db:speaker.short_bio',
    'config' => [
      'type' => 'text',
      'rows' => 3,
      'max' => 300,
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_speaker',
  'short_bio',
  '',
  'before:--div--;my_extension.db:tab.integration',
);
Copied!
placeholder
Type
string
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['placeholder']
Scope
Display
Types
input

Placeholder text for the field.

readOnly
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['readOnly']
Scope
Display

Renders the field in a way that the user can see the value but cannot edit it.

rows
Type
integer
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['rows']
Scope
Display
RenderType
textTable, codeEditor, default

The number of rows in the textarea. May be corrected for harmonization between browsers. Will also automatically be increased if the content in the field is found to be of a certain length, thus the field will automatically fit the content. Default is 5. Max value is 20.

Does not apply to RTE fields.

Example: A simple text editor with 20 width
The abstract of a talk

The abstract of a talk

EXT:my_extension/Configuration/TCA/Overrides/133-tx_myextension_conference-prices.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_conference', [
  'prices' => [
    'label' => 'my_extension.db:conference.prices',
    'config' => [
      'type' => 'text',
      'renderType' => 'textTable',
      'rows' => 5,
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_conference',
  'prices',
  '',
  'after:embed_code',
);
Copied!

Changed in version 14.0 Breaking: #106976 - Removal of TCA search field configuration options

The following TCA field level search configuration options have been removed:

  • search.case
  • search.pidonly
  • search.andWhere

They have not been supported by the Core or common Extensions.

searchable
Type
boolean
Default
true
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['searchable']
Scope
Display

New in version 14.0

TYPO3 now automatically includes all fields of suitable types in backend search operations in the Content > Records module.

This option can be used to explicitly exclude fields from being searchable, instead of having to list them in the now removed option $GLOBALS['TCA'][$table]['ctrl']['searchFields'].

By default, all fields of type text with rendertype table are considered searchable.

To exclude a field from being searchable, set the following in the field's TCA configuration:

EXT:my_extension/Configuration/TCA/Overrides/132-tx_myextension_conference-embed_code.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_conference', [
  'embed_code' => [
    'label' => 'my_extension.db:conference.embed_code',
    'config' => [
      'type' => 'text',
      'renderType' => 'codeEditor',
      'format' => 'html',
      'rows' => 7,
      'appearance' => [
        'lineWrapping' => true,
      ],
      'behaviour' => [
        'allowLanguageSynchronization' => true,
      ],
      'searchable' => false,
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_conference',
  'embed_code',
  '',
  'after:description',
);
Copied!
softref
Type
string
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['softref']
Scope
Proc.
Types
input

Used to attach "soft reference parsers".

The syntax for this value is key1,key2[parameter1;parameter2;...],...

See Soft references of core API for more details about softref keys.

wrap
Type
string (keyword)
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['wrap']
Scope
Display
RenderType
textTable, default

Determines the wrapping of the textarea field. Does not apply to RTE fields. There are two options:

virtual (default)
The textarea automatically wraps the lines like it would be expected for editing a text.
off
The textarea will not wrap the lines as you would expect when editing some kind of code.
Example: Textarea with no wrapping
The requirements of a workshop without wrapping

The requirements of a workshop without wrapping

EXT:my_extension/Configuration/TCA/Overrides/250-tx_myextension_talk-requirements.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionManagementUtility::addTCAcolumns('tx_myextension_talk', [
  'requirements' => [
    'label' => 'my_extension.db:talk.requirements',
    'config' => [
      'type' => 'text',
      'rows' => 3,
      'fixedFont' => true,
      'enableTabulator' => true,
      'wrap' => 'off',
    ],
  ],
]);
ExtensionManagementUtility::addToAllTCAtypes(
  'tx_myextension_talk',
  'requirements',
  'workshop',
  'before:--div--;core.form.tabs:access',
);
Copied!
Example: Textarea with virtual wrapping
'wrap' => 'virtual',
Copied!