您可以使用子表单:
$form = new Zend_Form(); $subForm = new Zend_Form_SubForm(); $subForm->addElement('Text', '1') ->addElement('Text', '2'); $form->addSubForm($subForm, 'element');
或者您也应该能够setBelongsTo()
在表单元素上使用(未经测试):
$form = new Zend_Form(); $form->addElement('Text', '1', array('belongsTo' => 'element')) ->addElement('Text', '2', array('belongsTo' => 'element'));