在 zend 表单视图脚本中编辑单个单选按钮 [英] Edit individual radio buttons in zend form view script

查看:37
本文介绍了在 zend 表单视图脚本中编辑单个单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用视图脚本的 zend 表单.我想访问各个单选按钮项目,但我不知道该怎么做.现在,我只是使用以下方法将它们全部打印出来:

I have a zend form which is using a view script. I want to get access to the individual radio button items but I'm not sure how to do so. Right now, I just print them all out using:

echo $this->element->getElement('myRadio');

这会将它们全部垂直打印出来.我需要多一点控制.我需要能够在一列中打印前 5 个选项,然后在第二列中打印下 5 个.

That prints them all out vertically. I need a little more control. I need to be able to print the first 5 options in one column then the next 5 in a second column.

推荐答案

也想出了这个.就用

$this->element->getElment('myRadio')->getMultiOptions();

它将返回一个键/值选项数组.

and it will return an array of the key/value options.

这篇关于在 zend 表单视图脚本中编辑单个单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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