Skip to content

Commit

Permalink
[FEATURE] Add types > creationOptions > defaultValues (#1166)
Browse files Browse the repository at this point in the history
* [FEATURE] Add types > creationOptions > defaultValues

Related: TYPO3-Documentation/Changelog-To-Doc#801
Resolves: #1161
Releases: main

* Update Documentation/Types/_CodeSnippets/_creationOptions.php

Co-authored-by: Stefan Frömken <[email protected]>

* [FEATURE] Add types > creationOptions > defaultValues

Related: TYPO3-Documentation/Changelog-To-Doc#801
Resolves: #1161
Releases: main

---------

Co-authored-by: Stefan Frömken <[email protected]>
  • Loading branch information
linawolf and froemken authored Sep 10, 2024
1 parent b4cb146 commit d5c15b2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Documentation/Types/_CodeSnippets/_creationOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
'div' => [
'creationOptions' => [
'saveAndClose' => true,
'defaultValues' => [
'bodytext' => '<p>some text</p>',
],
],
],
],
Expand Down
26 changes: 22 additions & 4 deletions Documentation/Types/_Properties/_CreationOptions.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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] <t3tsconfig:mod-wizards-newcontentelement-wizarditems>`.
.. 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 <t3tsconfig:mod-wizards-newcontentelement-wizarditems-group-elements-name-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 <t3tsconfig:mod-wizards-newcontentelement-wizarditems-group-elements-name-tt-content-defvalues>`.

0 comments on commit d5c15b2

Please sign in to comment.