useColumnsForDefaultValues

useColumnsForDefaultValues
Type:string (list of field names)
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 overwrite 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',
   ...
],