Hey folks,
I've created a custom decorator composite and for standard forms it works
very well. I am using
http://framework.zend.com/manual/en/zend.form.decorators.html#zend.form.decorators.custom
as a basis. However, the problem begins when using subforms for
multi-language records that I run into difficulties.
$subForm = new Zend_Form_SubForm();
foreach($langs as $key => $value)
{
$rowForm = new Zend_Form_SubForm();
$field = new Zend_Form_Element_Text('title');
$field->setLabel('Title')
->setRequired((bool) TRUE);
$rowForm->addElement($field);
$rowForm->setElementDecorators(
array(
array('Composite'),
)
);
$subForm->addSubForm($rowForm, $key);
}
Full Object Here: http://pastebin.com/n4LzTrN2
Forms_Decorators_Composite is here: http://pastebin.com/WMTRX1Zp
The expected name of the input is "languages[en][title]" - However, its only
returning a name of "title".
How can I resolve this issue? I'm beating my head against the wall here.
-Ryan
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Composite-Decorators-Subforms-tp3243227p3243227.html
Sent from the Zend Framework mailing list archive at Nabble.com.