我將YiiBooster與Yii一起使用來生成表單。YiiBooster radioButtonListRow無法正常工作
大部分表單工作 - typeahead,複選框和輸入行都很好。當我嘗試使用radioButtonListRow,它呈現的不是文本爲我的標籤模板文本({labelTitle} {ENDLABEL}):
<?php echo $form->radioButtonListRow(
$model,
'radioButtons',
array(
'Option one',
'Option two',
)
); ?>
導致HTML
<div class="control-group">
<label class="control-label" for="Surveys_radioButtons">GCSE Maths</label>
<div class="controls">
<input id="ytSurveys_radioButtons" type="hidden" value="" name="Surveys[radioButtons]">
<span id="Surveys_radioButtons">
<input id="Surveys_radioButtons_0" value="0" type="radio" name="Surveys[radioButtons]">
{labelTitle}{endLabel}
<input id="Surveys_radioButtons_1" value="1" type="radio" name="Surveys[radioButtons]">
{labelTitle}{endLabel}
</span>
</div>
</div>
上面的示例直接從YiiBooster examples複製,只更改屬性名稱。
任何人有任何想法我做錯了什麼?
https://github.com/yiisoft/yii/blob/master/framework/web/helpers/CHtml.php#L1239 – Atorich