useColumnsForDefaultValues

useColumnsForDefaultValues
Type
string (list of field names)
Path
$GLOBALS['TCA'][$table]['ctrl']
Scope
Proc.

When a new record is created, this defines the fields from the 'previous' record that should be used as default values.

What is considered the 'previous' record depends on how the record is created. For example, if TSconfig options.saveDocNew is enabled, you can create a new record from an existing one using the "New" button.

This may still get overridden by the default values for the record. When assigning values to a new record the following are used (applied in that order, e.g. Page TSconfig will override User TSconfig):

  1. User TSconfig
  2. Page TSconfig
  3. From 'previous' record
  4. Default values
  5. From 'inline' relations

See \TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew->DatabaseRowInitializeNew()

Examples

Example from "pages" table:

'ctrl' => [
   'useColumnsForDefaultValues' => 'doktype,fe_group,hidden',
   ...
],
Copied!