[英]Zend_Form: Wrap html tags around subforms
Say I have this form: 说我有这个表格:
$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');
And I wanted to wrap custom html around the subform like: 我想将自定义html包裹在子表单周围,例如:
<div id="foo">
<!-- subform here -->
</div>
How would I go about to do that? 我将如何去做?
addSubform()
does not take an option parameter like addElement()
does. addSubform()
不采用addElement()
那样的选项参数。
您可以将装饰器转换为子窗体。
$subform-> setSubFormDecorators($decorators);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.