From d5c15b23bfed5008ac91d1eb1d42d120b37395fc Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Tue, 10 Sep 2024 19:31:32 +0200 Subject: [PATCH] [FEATURE] Add types > creationOptions > defaultValues (#1166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FEATURE] Add types > creationOptions > defaultValues Related: https://github.com/TYPO3-Documentation/Changelog-To-Doc/issues/801 Resolves: https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA/issues/1161 Releases: main * Update Documentation/Types/_CodeSnippets/_creationOptions.php Co-authored-by: Stefan Frömken * [FEATURE] Add types > creationOptions > defaultValues Related: https://github.com/TYPO3-Documentation/Changelog-To-Doc/issues/801 Resolves: https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA/issues/1161 Releases: main --------- Co-authored-by: Stefan Frömken --- .../Types/_CodeSnippets/_creationOptions.php | 3 +++ .../_Properties/_CreationOptions.rst.txt | 26 ++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/Types/_CodeSnippets/_creationOptions.php b/Documentation/Types/_CodeSnippets/_creationOptions.php index 27ca5b51..002da343 100644 --- a/Documentation/Types/_CodeSnippets/_creationOptions.php +++ b/Documentation/Types/_CodeSnippets/_creationOptions.php @@ -8,6 +8,9 @@ 'div' => [ 'creationOptions' => [ 'saveAndClose' => true, + 'defaultValues' => [ + 'bodytext' => '

some text

', + ], ], ], ], diff --git a/Documentation/Types/_Properties/_CreationOptions.rst.txt b/Documentation/Types/_Properties/_CreationOptions.rst.txt index e314721a..c90c6ac4 100644 --- a/Documentation/Types/_Properties/_CreationOptions.rst.txt +++ b/Documentation/Types/_Properties/_CreationOptions.rst.txt @@ -17,7 +17,25 @@ :default: false :Examples: :ref:`types-example-creation-option` - If true, clicking on the new element wizard directs the user back to - the page module directly instead of showing the edit form from the form - engine. Can be overridden with page TSconfig - :confval:`newContentElement.wizardItems.[group].elements.[name] `. + .. versionadded:: 13.0 + + If true, clicking on the new element wizard will take the user directly + to the page module, rather than showing the edit form from the form + engine. + + Can be overridden with page TSconfig option + :confval:`saveAndClose `. + + .. confval:: defaultValues + :name: types-creationOptions-defaultValues + :Path: $GLOBALS['TCA'][$table]['types'][$type]['creationOptions']['defaultValues'] + :type: array + :Examples: :ref:`types-example-creation-option` + + .. versionadded:: 13.0 + + Default values inserted into the fields of the `tt_content` record on + creation via the "New Content Element" wizard + + Can be overridden with page TSconfig option + :confval:`tt_content_defValues `.