Php 我在magento面临无线电验证问题

Php 我在magento面临无线电验证问题,php,magento,Php,Magento,我已经在magento中添加了radios字段,但我在验证中遇到问题,它显示所有收音机都是必需的,并且当我选择一个选项时,它给了我其他选项的错误 这是我的密码: <?php $fieldset->addField('size', 'radios', array( 'label' => Mage::helper('moduelname')->__('Maximum rim

我已经在magento中添加了radios字段,但我在验证中遇到问题,它显示所有收音机都是必需的,并且当我选择一个选项时,它给了我其他选项的错误

这是我的密码:

<?php 

$fieldset->addField('size', 'radios',
                       array(
                          'label' => Mage::helper('moduelname')->__('Maximum rim size you can handle
'),
                          'class' => 'required-entry',
                          'required' => false,
                           'name' => 'size',
                           'values' => array(array('value' => '17', 'label'=>'17 inch'),
                                       array('value' =>'18', 'label'=>'18 inch'),
                                       array('value' =>'19', 'label'=>'19 inch')
                                      ,array('value' =>'20', 'label'=>'20 inch')
                                      ,array('value' =>'21', 'label'=>'21 inch')
                                      ,array('value' =>'22', 'label'=>'22 inch')
                                      ,array('value' =>'23', 'label'=>'23 inch')
                                      ,array('value' =>'24', 'label'=>'24 inch')
                                      ,array('value' =>'25', 'label'=>'25 inch'),),
                    ));

?>

更改

'class' => 'required-entry',


希望这对你有用。

参加“必修课”。
'class' => 'validate-one-required-by-name',