Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
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):
- User TSconfig
- Page TSconfig
- From 'previous' record
- Default values
- From 'inline' relations
See
\TYPO3\
CMS\ Backend\ Form\ Form Data Provider\ Database Row Initialize New->Database Row Initialize New ()
Examples
Example from "pages" table:
'ctrl' => [
'useColumnsForDefaultValues' => 'doktype,fe_group,hidden',
...
],