Zend_Form:带有复选框的 HTML 表中的数据库记录 [英] Zend_Form: Database records in HTML table with checkboxes

查看:18
本文介绍了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 表中的数据库记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆