Zend_Form: Database records in HTML table with checkboxes(Zend_Form:带有复选框的 HTML 表中的数据库记录)
问题描述
我正在尝试将 HTML 多列表添加到 Zend_Form.该表将由数据库中的数据填充,每行前面应有一个复选框,如下面的 ASCII 所示:
I am trying to add a HTML multi-column table to a Zend_Form. The table would be populated by data from the database and each row should be preceded by a checkbox, as shown in the ASCII below:
+-----+-------------------------+-----------------------+--------------+
| | Column_1 | Column_2 | Column_3 |
+-----+-------------------------+-----------------------+--------------+
| [x] | Row #1 | Some data | more data |
+-----+-------------------------+-----------------------+--------------+
| [x] | Row #2 | Some data | more data |
+-----+-------------------------+-----------------------+--------------+
| [x] | Row #3 | Some data | more data |
+-----+-------------------------+-----------------------+--------------+
该表将处理多对多关系.有人会碰巧知道如何实现这一点吗?
The table would handle many-to-many relationships. Would anyone happen to know how to implement this?
推荐答案
至少你必须移除 DtDd Decorator,将 Html Decorator 标签设置为div 并删除 Label 装饰器.
At the very least you'll have to remove DtDd Decorator, set the Html Decorator tag to div and remove the Label Decorator.
我建议你尽可能地制作表格,然后从那里开始工作,至少试一试.
I suggest you make the form as best you can then work from that, at least give it a go.
在最坏的情况下,您将不得不编写自己的表单元素来复制此 HTML.
In the worst situation you will have to write your own form elements to replicate this HTML.
这篇关于Zend_Form:带有复选框的 HTML 表中的数据库记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Zend_Form:带有复选框的 HTML 表中的数据库记录
基础教程推荐
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- php中的PDF导出 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- Web 服务器如何处理请求? 2021-01-01
- php中的foreach复选框POST 2021-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
