Answer the question
In order to leave comments, you need to log in
Customizing radioList() yii2?
In the standard output of radioList()
<?=$form->field($model,'created_at')->radioList(['Radio 1', 'Radio 2', 'Radio 3'],['labelOptions'=>['class'=>'mt-radio'],'name'=>"test"]); ?>
<div id="users-created_at" name="test" labeloptions="{"class":"mt-radio"}"><label><input type="radio" name="test" value="0"> Radio 1</label>
<label><input type="radio" name="test" value="1"> Radio 2</label>
<label><input type="radio" name="test" value="2"> Radio 3</label></div>
Html::beginTag('label', $labelOptions) .
Html::Tag('input','',$options).
Html::beginTag('span') .
Html::endTag('span') .
Html::endTag('label');
<label class="mt-radio"><input type="radio" name="test"]"><span></span></label>
Answer the question
In order to leave comments, you need to log in
Good afternoon.
You are doing everything wrong.
The documentation for radioList has a link to activeRadioList . In the options parameter, you can call a function in which you override the appearance of radioList
ps Approximately like this:
'item' => function($index,$label,$name,$checked,$value){
return Html::radio($name,
$checked,
[
'label' => $label,
'value' => $value,
'labelOptions' => ['class' => 'niceInput']
]);
}
robots.txt with content:
User-agent: *
Disallow: /*demo
At the root of each folder, throw robots.txt that prohibits indexing. Is that what you asked? It just seems obvious to me.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question