1

我需要使用装饰器从 Zend_Form_Radio 获取此输出:

<div>
    <label class="normal-label">Gender</label>
    <div class="buttonset">
        <input type="radio" id="radio1" name="gender" class="rbutton" />
        <label for="radio1" class="ui-button"><span class="ui-button-text">Male</span></label>

        <input type="radio" id="radio2" name="gender" class="rbutton" />
        <label for="radio2" class="ui-button"><span class="ui-button-text">Female</span></label>
    </div>
</div>

我尝试了很多装饰器组合,但我从未达到内部标签。我的一项测试:

$this->setDecorators(array(
        'ViewHelper',
        'Errors',
        array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'buttonset') ),
        array('Label', array('class' => 'normal-label')),
        array(array('row' => 'HtmlTag'), array('tag' => 'div' ) ),
    ));            
    $this->setSeparator(' ');
4

0 回答 0