Index: library/Zend/Form.php =================================================================== --- library/Zend/Form.php (revision 25022) +++ library/Zend/Form.php (working copy) @@ -353,6 +353,11 @@ unset($options['attribs']); } + if (isset($options['subForms'])) { + $this->addSubForms($options['subForms']); + unset($options['subForms']); + } + $forbidden = array( 'Options', 'Config', 'PluginLoader', 'SubForms', 'Translator', 'Attrib', 'Default', @@ -1643,7 +1648,7 @@ public function addSubForms(array $subForms) { foreach ($subForms as $key => $spec) { - $name= (string) $key; + $name = (string) $key; if ($spec instanceof Zend_Form) { $this->addSubForm($spec, $name); continue; @@ -1657,6 +1662,10 @@ continue; case (1 <= $argc): $subForm = array_shift($spec); + + if (!$subForm instanceof Zend_Form) { + $subForm = new Zend_Form_SubForm($subForm); + } case (2 <= $argc): $name = array_shift($spec); case (3 <= $argc):