Project

General

Profile

Actions

Feature #68097

closed

add the marker ###PARENT_UID### to the $TCA column type:inline, foreign_record_defaults property

Added by Sebastian Mazza over 9 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-07-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

Description

Posible Solution:

Change the line 644 in typo3_src-7.3.1/typo3/sysext/backend/Classes/Form/FormEngine.php
from:

$record[$fieldName] = $defaultValue;

to:

$record[$fieldName] = str_replace('###PARENT_UID###', $parent['uid'], $defaultValue);

surrounding loop:

foreach ($config['foreign_record_defaults'] as $fieldName => $defaultValue) {
    if (isset($foreignTableConfig['columns'][$fieldName]) && !in_array($fieldName, $notSettableFields)) {
        //$record[$fieldName] = $defaultValue;
        $record[$fieldName] = str_replace('###PARENT_UID###', $parent['uid'], $defaultValue);
    }
}


Files

Bildschirmfoto 2015-07-14 um 14.18.51.png (53.2 KB) Bildschirmfoto 2015-07-14 um 14.18.51.png add new Shop problem example Sebastian Mazza, 2015-07-14 14:58
Bildschirmfoto 2015-07-14 um 14.21.43.png (63 KB) Bildschirmfoto 2015-07-14 um 14.21.43.png simplified Domain Model Sebastian Mazza, 2015-07-14 14:58
Actions

Also available in: Atom PDF