Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/249.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Zend表单复选框元素自定义_Php_Zend Framework_Zend Form - Fatal编程技术网

Php Zend表单复选框元素自定义

Php Zend表单复选框元素自定义,php,zend-framework,zend-form,Php,Zend Framework,Zend Form,我有一个zend表单,上面有一些元素,包括一个复选框。 看起来很正常: checkbox label [] 我想在右侧添加一个链接,使其看起来像这样: checkbox label [] thelink 我尝试了以下方法,但没有将描述与复选框水平对齐,而是将其放在下面: $boolean->setDescription('desc'); $boolean->setDecorators(array( 'ViewHelper',

我有一个zend表单,上面有一些元素,包括一个复选框。 看起来很正常:

checkbox label []
我想在右侧添加一个链接,使其看起来像这样:

checkbox label [] thelink
我尝试了以下方法,但没有将描述与复选框水平对齐,而是将其放在下面:

$boolean->setDescription('desc');
        $boolean->setDecorators(array(
            'ViewHelper',
            'Description',
            'Errors',
            array('HtmlTag', array('tag' => 'dd')),
            array('Label', array('tag' => 'dt')),
        ));
我是Zend Forms的乞丐。你知道我该怎么做吗

谢谢

明白了

我是这样做的:

  $boolean->setDescription('description');
        $boolean->setDecorators(array(
            'ViewHelper',
            'Description',
            'Errors',
            array('HtmlTag', array('tag' => 'dd')),
            array('Label', array('tag' => 'dt')),
            array('Description', array('escape' => false, 'tag' => '', 'placement' => 'append')),
        ));
我想你可能需要一个电话。请看一看被接受的答案,我认为它可能会为您指明正确的方向。请尝试更改dd标记的样式(宽度、浮动等)<代码>$element->getDecorator('HtmlTag')->setOption('style','width:20px;')