【发布时间】:2010-11-07 09:16:43
【问题描述】:
我想在逻辑产品组中显示单选按钮:
Broadband products:
(*) 2 Mbit
( ) 4 Mbit
Voice products:
( ) Standard
( ) Total
Bundles:
( ) 4 Mbit + Standard
( ) 4 Mbit + Total
所有单选按钮都具有相同的name 属性 - 你明白了。 Zend Framework 1.8 似乎不支持以这种方式对单选按钮进行分组。有什么解决办法吗?
更新。澄清一下,生成的代码看起来应该是这样的:
Broadband products: <br/>
<input type="radio" name="product" value="1"/> 2 Mbit <br/>
<input type="radio" name="product" value="2"/> 4 Mbit <br/>
Voice products: <br/>
<input type="radio" name="product" value="3"/> Standard <br/>
<input type="radio" name="product" value="4"/> Total <br/>
Bundels: <br/>
<input type="radio" name="product" value="5"/> 4 Mbit + Standard <br/>
<input type="radio" name="product" value="6"/> 4 Mbit + Total <br/>
不要介意确切的格式代码。只有表单元素很重要。
【问题讨论】:
-
这听起来可能是同一个问题。 framework.zend.com/issues/browse/ZF-3541 报道者在他的帖子中提出了一个修复方案。
-
你在使用 Zend_Form 吗?
-
是的,我确实使用 Zend_Form。
标签: php zend-framework radio-button