Reputation: 2445
I have problem on custom payment method in magento system. On payment information step in checkout progress i need to show radio button list under my payment method. Here is code:
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
<li>
<?php echo $this->getMethod()->getConfigData('message');?>
</li>
<li>
<span class="input-box">
<input type="radio" title="<?php echo $this->__('option1') ?>" id="<?php echo $_code ?>_option1" name="payment[]" value="1" checked="true"><?php echo $this->__('option1') ?></input>
</span>
</li>
<li>
<span class="input-box">
<input type="radio" title="<?php echo $this->__('option2') ?>" id="<?php echo $_code ?>_option2" name="payment[]" value="2" ><?php echo $this->__('option2') ?></input>
</span>
</li>
<li>
<span class="input-box">
<input type="radio" title="<?php echo $this->__('option3') ?>" id="<?php echo $_code ?>_option3" name="payment[]" value="3" ><?php echo $this->__('option3') ?></input>
</span>
</li>
The problem is that I can't continue my process. Something is wrong and I suspect on validation. Please look at name attributes. They must all be equal so I can only chehk one of radio button, but I am not sure is it OK with magento?
Can someone help me with this?
Upvotes: 0
Views: 977
Reputation: 41
Your first input field has the attribute "checked" but with the wrong value. If you use HTML5 you only need to write "checked" - without an attribute value. If you prefer the XHTML style the correct value to use is "checked".
HTML5:
<input type="radio" checked />
XHTML:
<input type="radio" checked="checked" />
Upvotes: 0