0

假设我有这个表格:

$this->addElement('select', 'menu');

$subform = new Zend_Form_SubForm();
$subform->addElement('text', 'title');
$subform->addElement('text', 'content');

$this->addSubform($subform, 'bar');

$this->addElement('submit', 'submit');

我想将自定义 html 包裹在子表单周围,例如:

<div id="foo">
     <!-- subform here -->
</div>

我该怎么做呢?addSubform()不像那样采用选项参数addElement()

4

1 回答 1

1

您可以将装饰器添加到子窗体。

$subform-> setSubFormDecorators($decorators);
于 2013-11-16T22:22:52.287 回答