Hi,
the names are wrong. Please check this:
$form = new Zend_Form();
$form->setElementsBelongTo('foobar');
$form->addElement('text', 'firstName');
$form->addElement('text', 'lastName');
$subForm = new Zend_Form_SubForm();
$subForm->setElementsBelongTo('baz');
$subForm->addElement('text', 'email');
$subSubForm = new Zend_Form_SubForm();
$subSubForm->setElementsBelongTo('bat');
$subSubForm->addElement('checkbox', 'home');
$subForm->addSubForm($subSubForm, 'subSub');
$form->addSubForm($subForm, 'sub');
Kind regards,
Frank
Am .08.2015, 03:41 Uhr, schrieb artsylar <[email protected]>:
[Update 08/17/2015]
I have tried the following code I got from
http://zend-framework-community.634137.n4.nabble.com/Improved-array-support-for-Zend-Form-td667215.html
as it says in that post that subform elementsTobelong to is working
properly.
But here's what I'm getting for the $subForm's and $subFubForm's
elements.
I hope someone can help me with this problem.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/setElementsBelongTo-effect-on-subform-elements-tp4662645p4662651.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]