<legend id='vJckj'><style id='vJckj'><dir id='vJckj'><q id='vJckj'></q></dir></style></legend>
  • <tfoot id='vJckj'></tfoot>

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

    2. <small id='vJckj'></small><noframes id='vJckj'>

      • <bdo id='vJckj'></bdo><ul id='vJckj'></ul>

        如何配置 Zend_Form 以使用数组表示法?

        时间:2023-10-02

      1. <tfoot id='2Km0c'></tfoot>

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

            • <bdo id='2Km0c'></bdo><ul id='2Km0c'></ul>
                  <tbody id='2Km0c'></tbody>

                  <small id='2Km0c'></small><noframes id='2Km0c'>

                  本文介绍了如何配置 Zend_Form 以使用数组表示法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在配置 Zend_Form 时遇到困难.我有一个 Zend_Form 子类.该表格包含一些必需信息和一些附加信息.我希望可以通过数组访问附加信息.提交的数据看起来像这样:

                  I'm having difficulty configuring Zend_Form. I have a Zend_Form sub-class. The form has some required information and some additional information. I want the additional information to be accessible via an array. The submitted data will look something like this:

                  $formData['required1']
                  $formData['required2']
                  $formData['addiotnalData']['aData1']
                  $formData['addiotnalData']['aData2']
                  

                  我在谷歌上搜索并尝试了我找到的所有建议(使用 subForms 并设置 Zend_Form::setIsArray($flag)Zend_Form::setElementsBelongTo($array) 方法),但还没有想出如何做到这一点.

                  I've Googled this and tried all the suggestions I've found (using subForms and setting the Zend_Form::setIsArray($flag) and Zend_Form::setElementsBelongTo($array) methods), but have not figured out how to do this.

                  我做错了什么?如何设置表单元素的名称,以便我可以使用数组表示法访问数据?

                  What am I doing wrong? How do I set the names of form elements so that I can access the data with array notation?

                  推荐答案

                  已排序!问题是正在使用的自定义装饰器.

                  Sorted it! The problem is a custom decorator that was being used.

                  //In
                  $subForm = new Form_SubForm(); //this can be a Zend_Form or Zend_Form_SubForm     
                  $subForm->setIsArray(true);
                  $this->addSubForm($subForm, 'subform');
                  

                  元素将以 subform-elementname 的 id 和 subform[elementname] 的名称呈现.

                  Elements will be rendered with a id of subform-elementname and a name of subform[elementname].

                  这篇关于如何配置 Zend_Form 以使用数组表示法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Zend Framework 2 和 Doctrine 2 - 多个数据库的配置 下一篇:如何结合zend框架和Codeigniter?

                  相关文章

                  最新文章

                  • <bdo id='iU2FY'></bdo><ul id='iU2FY'></ul>
                  <tfoot id='iU2FY'></tfoot>

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

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