Zend Framework 1表单中的按钮代码:
$current_image = $this->CreateElement('button','current_image',
array( 'label' => 'Browse Files',
'class' => 'btn btn-default',
'required' => true));
$this->addElement($current_image);
输出以下内容:
<dt id="current_image-label"> </dt>
<dd id="current_image-element">
<button name="current_image" id="current_image" type="button" class="btn btn-default">Browse Files</button>
</dd>
尝试过setLabel(),但未在<dt id="current_image-label"> </dt>
中显示标签