2015-06-05 24 views
1

我在magento中添加了無線電領域,但是我在驗證時遇到了問題,它顯示所有無線電都是必需的,當我選擇一個選項時,它給了我其他選項的錯誤。我正在面對magento中的無線電驗證問題

這裏是我的代碼:

<?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'),), 
        )); 

?> 
+0

取出「要求入境'班。 –

回答

1

變化

'class' => 'required-entry', 

'class' => 'validate-one-required-by-name', 

希望這會爲你工作..

+0

謝謝你的作品! –