Forms 元素复选框的标签总是在左边,需要一个链接

Forms 元素复选框的标签总是在左边,需要一个链接,forms,zend-framework2,Forms,Zend Framework2,如何更改复选框和标签的位置以及如何实现标签中的链接 $acceptGTC = new Element\Checkbox('AGBs'); $acceptGTC->setLabel('I Accept the GTC (<a href="some link">show it</a>).'); $this->add($acceptGTC); 问候 n00n 同时: 我试图覆盖复选框的视图帮助器 抄袭 */vendor/zendframework/zend for

如何更改复选框和标签的位置以及如何实现标签中的链接

$acceptGTC = new Element\Checkbox('AGBs');
$acceptGTC->setLabel('I Accept the GTC (<a href="some link">show it</a>).');
$this->add($acceptGTC);
问候 n00n

同时: 我试图覆盖复选框的视图帮助器

抄袭 */vendor/zendframework/zend form/src/View/Helper/FormCheckbox.php 到 */module/Application/src/Application/View/Helper/FormCheckbox.php

添加到module.config.php “viewhelpers'=>array'复选框'=>Application\View\Helper'

但它仍然使用原来的一个。。。
我必须告诉zend使用我的FormCheckbox吗?

我不知道您渲染zend\u Form\u元素的方式,但是为了按照您的需要增强渲染效果,您应该构建一个自定义装饰器,并将其添加到此元素中

您应该阅读Zend_Form_Decorators上的Zend文档,所有内容都有很好的解释,应该会引导您找到一个奇特的解决方案