相关疑难解决方法(0)

ZF2表单中的按钮内容

如何编辑Button元素(ZF2表单)的按钮内容?我可以设置一个标签,但我想在其中插入一些HTML代码.

    $this->add(array(
        'type' => 'Button',
        'name' => 'submit',
        'options' => array(
            'label'   => 'Modifica',
        ),
        'attributes' => array(
            'type'  => 'submit',
            'class' => 'btn btn-warning'
        )
    ));
Run Code Online (Sandbox Code Playgroud)

谢谢

zend-form zend-form-element zend-framework2

3
推荐指数
2
解决办法
6432
查看次数