See https://forge.typo3.org/issues/69047 - Returned value from "form field wizard" in flexform is not stored in database
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | diff --git a/typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php b/typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php index 829c64d..091a03d 100644 --- a/typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php +++ b/typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php @@ -121,7 +121,14 @@ class FlexFormElementContainer extends AbstractContainer { $fakeParameterArray['onFocus'] = $parameterArray['onFocus']; $fakeParameterArray['label'] = $parameterArray['label']; + $originalFieldName = $parameterArray['itemFormElName']; $fakeParameterArray['itemFormElName'] = $parameterArray['itemFormElName'] . $flexFormFormPrefix . '[' . $flexFormFieldName . '][' . $lkey . ']'; + if ($fakeParameterArray['itemFormElName'] !== $originalFieldName) { + if (!empty($fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'])) { + $fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] = str_replace($originalFieldName, $fakeParameterArray['itemFormElName'], $fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged']); + } + } + $fakeParameterArray['itemFormElID'] = $fakeParameterArray['itemFormElName']; if (isset($flexFormRowData[$flexFormFieldName][$lkey])) { $fakeParameterArray['itemFormElValue'] = $flexFormRowData[$flexFormFieldName][$lkey]; |