.. include:: /Includes.rst.txt .. index:: TCAdefaults Records; Default values .. _pagetstcadefaults: =========== TCAdefaults =========== .. versionadded:: 14.0 The :typoscript:`TCAdefaults` configuration has been extended to support type-specific syntax similar to `TCEFORM `_, enabling different default values based on the record type. This allows the `default` values of `TCA` fields available for various TCA column types to be set or overridden, for instance for :ref:`type=input `. Default values can be set at the type level: `TCAdefaults.[table name].[field].types.[type]` or field level: `TCAdefaults.[table name].[field]` This key is also available at the :ref:`User TSconfig level `. The order of setting default values when creating new records in the backend is this: #. Database field default value #. Value from `$GLOBALS['TCA']` #. Field-level ref:`user TSconfig ` #. Type-level ref:`user TSconfig ` #. Field-level :typoscript:`TCAdefaults` configuration #. Type-level :typoscript:`TCAdefaults` configuration #. Value from "defVals" GET variables #. Value from previous record based on :ref:`useColumnsForDefaultValues ` .. note:: `TCAdefaults` are not applied to :ref:`FlexForm ` values. These can only be set via :xml:`` elements within the FlexForm data structure. .. _pagetstcadefaults-example: Example: Do not hide newly created pages by default =================================================== .. code-block:: typoscript :caption: EXT:my_sitepackage/Configuration/page.tsconfig TCAdefaults.pages.hidden = 0 .. _pagetstcadefaults-example-type: Example: Set type specific default values ========================================= .. literalinclude:: _type.typoscript :caption: EXT:my_sitepackage/Configuration/page.tsconfig