creationOptions

creationOptions
Type
list of options
Path
$GLOBALS['TCA'][$table]['types'][$type]['creationOptions']

New in version 13.0

saveAndClose
Type
bool
Default
false
Path
$GLOBALS['TCA'][$table]['types'][$type]['creationOptions']['saveAndClose']

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 newContentElement.wizardItems.[group].elements.[name].

Example: Activate save and close for divider content element

EXT:my_extension/Configuration/TCA/Overrides/tt_content.php
<?php

$GLOBALS['TCA']['tt_content'] = array_merge_recursive($GLOBALS['TCA']['tt_content'], [
    // ...
    'types' => [
        'div' => [
            'creationOptions' => [
                'saveAndClose' => true,
            ],
        ],
    ],
]);
Copied!