Fixed bug #214 (flexform default values)
authorKarsten Dambekalns <karsten.dambekalns@typo3.org>
Wed, 14 Sep 2005 11:35:02 +0000 (11:35 +0000)
committerKarsten Dambekalns <karsten.dambekalns@typo3.org>
Wed, 14 Sep 2005 11:35:02 +0000 (11:35 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@793 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php

index c83da8a..60c2b08 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-09-14 Karsten Dambekalns <karsten@typo3.org>
+
+       * Fixed bug #214 (flexform default values), as it has been reported to work with the existing patch.
+
 2005-09-13 Ingmar Schlecht <ingmar@typo3.org>
 
        * Fixed bug #1375: Made typo3/mod/tools/em/index.php use preg_quote() on filename before passing it to preg_match()
index 3d66c05..8d8b4f8 100755 (executable)
@@ -2158,7 +2158,12 @@ class t3lib_TCEforms     {
 
                                                        $fakePA['itemFormElName']=$PA['itemFormElName'].$formPrefix.'['.$key.']['.$vDEFkey.']';
                                                        $fakePA['itemFormElName_file']=$PA['itemFormElName_file'].$formPrefix.'['.$key.']['.$vDEFkey.']';
-                                                       $fakePA['itemFormElValue']=$editData[$key][$vDEFkey];
+                                                       if(isset($editData[$key][$vDEFkey])) {
+                                                         $fakePA['itemFormElValue']=$editData[$key][$vDEFkey];
+                                                       }
+                                                       else {
+                                                         $fakePA['itemFormElValue']=$fakePA['fieldConf']['config']['default'];
+                                                       }
 
                                                        $rowCells['formEl']= $this->getSingleField_SW($table,$field,$row,$fakePA);
                                                        $rowCells['title']= htmlspecialchars($fakePA['fieldConf']['label']);