开发者

What's the simplest way to create a Zend_Form tabular display with each row having a radio button?

I've seen simple examples of rendering a Zend_Form using decorators, but I'm not sure they are able to handle the issue I'm facing very well.

I query the database and get an array of user objects. I want to display these users as a form, with a radio button next to each of them and a submit button at the bottom of the page.

Here's roughly what the form will look like:

   [user id]  [email]         [full name]
( ) 1         test@test.com   Test user 1
(*) 2         test2@test.com  Te开发者_JAVA百科st user 2
[SUBMIT]

Is this something achievable in a reasonably straightforward way or do I need to use the ViewScript partial?


You should easily achieve this layout Leveraging Zend Form Decorators.

Edit:

You may be interested also on Zendcasts:
Zend Form decorators explained and Creating custom Zend Form Decorators.

BTW, This is pretty common layout for preferences:

Display preferences http://img707.imageshack.us/img707/3244/displaypreferences.gif

Once you are finished, post your working code here for reference.


Just a quick suggestion. Why do you need table for this? The default definition list markup can be styled to look exactly like you want it to look.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜