<legend id='y9juo'><style id='y9juo'><dir id='y9juo'><q id='y9juo'></q></dir></style></legend>
<tfoot id='y9juo'></tfoot>

    <i id='y9juo'><tr id='y9juo'><dt id='y9juo'><q id='y9juo'><span id='y9juo'><b id='y9juo'><form id='y9juo'><ins id='y9juo'></ins><ul id='y9juo'></ul><sub id='y9juo'></sub></form><legend id='y9juo'></legend><bdo id='y9juo'><pre id='y9juo'><center id='y9juo'></center></pre></bdo></b><th id='y9juo'></th></span></q></dt></tr></i><div id='y9juo'><tfoot id='y9juo'></tfoot><dl id='y9juo'><fieldset id='y9juo'></fieldset></dl></div>
  1. <small id='y9juo'></small><noframes id='y9juo'>

      • <bdo id='y9juo'></bdo><ul id='y9juo'></ul>
    1. 在一行上显示 Zend_Form_Element_Radio

      时间:2023-05-31
        <i id='7obZe'><tr id='7obZe'><dt id='7obZe'><q id='7obZe'><span id='7obZe'><b id='7obZe'><form id='7obZe'><ins id='7obZe'></ins><ul id='7obZe'></ul><sub id='7obZe'></sub></form><legend id='7obZe'></legend><bdo id='7obZe'><pre id='7obZe'><center id='7obZe'></center></pre></bdo></b><th id='7obZe'></th></span></q></dt></tr></i><div id='7obZe'><tfoot id='7obZe'></tfoot><dl id='7obZe'><fieldset id='7obZe'></fieldset></dl></div>
          <tbody id='7obZe'></tbody>

      • <tfoot id='7obZe'></tfoot>

            <small id='7obZe'></small><noframes id='7obZe'>

            <legend id='7obZe'><style id='7obZe'><dir id='7obZe'><q id='7obZe'></q></dir></style></legend>
              <bdo id='7obZe'></bdo><ul id='7obZe'></ul>

                本文介绍了在一行上显示 Zend_Form_Element_Radio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                Zend Framework 中的单选按钮显示在一列中(每行一个选项).如何从标记中删除 br 标签,以便所有单选选项都在一行中?

                The radio buttons in Zend Framework are displayed in a column (one option per line). How can I remove the br tag from the markup so that all radio options stay in one line?

                我的装饰者是:

                private $radioDecorators = array(
                    'Label',
                    'ViewHelper',
                    array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'radio')),
                    array(array('row' => 'HtmlTag'), array('tag' => 'li')),
                );
                

                推荐答案

                您需要在 Zend_Form_Element_Radio 对象上调用 setSeparator 方法,并传递它 ''.这是此处的示例:

                You need to call the setSeparator method on the Zend_Form_Element_Radio object, passing it ''. Here's an example from here:

                <?php     
                
                class CustomForm extends Zend_Form
                {
                  public function init()
                  {
                    $this->setMethod('post');
                    $this->setAction('user/process');
                    $gender = new Zend_Form_Element_Radio('gender');
                    $gender->setLabel('Gender:')
                      ->addMultiOptions(array(
                        'male' => 'Male',
                        'female' => 'Female'
                      ))
                      ->setSeparator('');
                  }
                }
                

                这篇关于在一行上显示 Zend_Form_Element_Radio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何向 Zend Framework 2 添加自定义视图助手 下一篇:PHP - if 语句中的倒序

                相关文章

                <tfoot id='nNcCd'></tfoot>

                <small id='nNcCd'></small><noframes id='nNcCd'>

                  <bdo id='nNcCd'></bdo><ul id='nNcCd'></ul>
              1. <legend id='nNcCd'><style id='nNcCd'><dir id='nNcCd'><q id='nNcCd'></q></dir></style></legend>

                    <i id='nNcCd'><tr id='nNcCd'><dt id='nNcCd'><q id='nNcCd'><span id='nNcCd'><b id='nNcCd'><form id='nNcCd'><ins id='nNcCd'></ins><ul id='nNcCd'></ul><sub id='nNcCd'></sub></form><legend id='nNcCd'></legend><bdo id='nNcCd'><pre id='nNcCd'><center id='nNcCd'></center></pre></bdo></b><th id='nNcCd'></th></span></q></dt></tr></i><div id='nNcCd'><tfoot id='nNcCd'></tfoot><dl id='nNcCd'><fieldset id='nNcCd'></fieldset></dl></div>