添加子窗体在我的控制器我有一个功能,它看起来像这样:Zend公司 - 现有的显示组
public function newExperienceAction() {
$this->_helper->layout->disableLayout();
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('newExperience', 'html')->initContext();
$id = $this->_getParam('id', null);
$this->form = new Application_Form_Cv();
$this->experience = new Zend_Form_SubForm();
$this->form->addSubForm($this->experience, 'experience');
$rowExperience = new Application_Form_Experience();
$rowExperience->setDisplayGroups('experience');
$this->experience->addSubForm($rowExperience, "experience$id", $id+3);
echo $rowExperience->__toString();
}
当用户按下(+)的形式,新的子窗体将显示。
我目前正在将其整形为表格。我将在此表单上有多个子表单,因此我需要使用DisplayGroups。
在这种情况下,我相信我必须在第一次创建窗体时创建一个显示组。
然后,我需要将新的子窗体添加到现有的显示组。
所以问题:
如何添加新的子窗体到现有显示组?
这不是一个答案,tihs是对给出的其他答案的反应,这也不是所需的答案。 – 2012-05-08 16:57:11
这是一个答案。这告诉你这不被支持。 – 2012-05-09 12:05:54