Answer the question
In order to leave comments, you need to log in
YII2. Radio Buttons: How to change the style for the selected option?
Usually I wrote in css: input[type=radio]:checked + label:before { ... }
And in HTML:
<input id="decline" type="radio" name="action" value="Decline">
<label for="decline">Decline</label>
<?=$form->field($model, 'checkingAction')->inline()->radioList($text[weekly_check_options], [
'onchange' => new \yii\web\JsExpression($onChangeJs)]
)->label(false);?>
<label class="radio-inline"><input type="radio" name="Task_to_user[checkingAction]" value="2"> Decline</label>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question