how to remove span tag from CHtml::radioButtonList() output?

CHtml::checkBoxList() & CHtml::radioButtonList() wrap output in a span tag, I use following template to output each input as a list item (li). so in this situation li’s parent is span not ul, is there any way to remove span?




<ul>

<?php echo $form->radioButtonList($model,'cms',array('0'=>'False','1'=>'True'),array('template'=>'<li>{input}{label}</li>','separator'=>'')); ?>

</ul>



output:




<ul><input type="hidden" name="SubmitForm[cms]" value="" id="ytSubmitForm_cms"><span id="SubmitForm_cms"><li><input type="radio" name="SubmitForm[cms]" value="0" id="SubmitForm_cms_0"><label for="SubmitForm_cms_0">False</label></li><li><input type="radio" name="SubmitForm[cms]" value="1" id="SubmitForm_cms_1"><label for="SubmitForm_cms_1">True</label></li></span></ul>



Yii version 1.1.10 has not that option.

This option has been added to the Yii developer version - https://github.com/y...0e4a6abf31e5cb0

You can set it to empty or even to a custom container - "ul" in your cas, but this can possibly break CActiveForm validation

tnx for reply.

I am new to yii so please tell me are developer versions stable enough?

The developer version is changing everyday so it depends on what has been committed at the time you decide to use it…

If you need just that functionality you can just "patch" your CHtml file by checking the above link for changes.

I just want to check on the current status.

I am using 1.1.10 version.

I have checkboxlist with container = ‘div’

I change the container to anything and the ajax validation stops working.

Is it fixed in the later version?

Is there any easy fix for this?

Thank you for your input.

Regards,

codingdaddy