diff --git a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php index 94935d01fec6ba92e20001db7356241f7bff5cd8..2d0540992f8de26b8d59ec36267cb43923034005 100644 --- a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php @@ -131,7 +131,6 @@ abstract class AbstractFormElement extends AbstractNode { $fieldChangeFunc = $PA['fieldChangeFunc']; $item = $itemKinds[0]; - $fName = '[' . $table . '][' . $row['uid'] . '][' . $field . ']'; $md5ID = 'ID' . GeneralUtility::shortmd5($itemName); $fieldConfig = $PA['fieldConf']['config']; $prefixOfFormElName = 'data[' . $table . '][' . $row['uid'] . '][' . $field . ']'; @@ -140,17 +139,9 @@ abstract class AbstractFormElement extends AbstractNode { $flexFormPath = str_replace('][', '/', substr($PA['itemFormElName'], strlen($prefixOfFormElName) + 1, -1)); } - // Manipulate the field name (to be the TRUE form field name) and remove - // a suffix-value if the item is a selector box with renderMode "singlebox": - $listFlag = '_list'; - if ($PA['fieldConf']['config']['type'] == 'select') { - // Single select situation: - if ($PA['fieldConf']['config']['maxitems'] <= 1) { - $listFlag = ''; - } elseif ($PA['fieldConf']['config']['renderMode'] == 'singlebox') { - $itemName .= '[]'; - $listFlag = ''; - } + // Add a suffix-value if the item is a selector box with renderMode "singlebox": + if ($PA['fieldConf']['config']['type'] === 'select' && (int)$PA['fieldConf']['config']['maxitems'] > 1 && $PA['fieldConf']['config']['renderMode'] === 'singlebox') { + $itemName .= '[]'; } // Contains wizard identifiers enabled for this record type, see "special configuration" docs