A
A
Alexander Laikov2017-01-20 20:57:42
Yii
Alexander Laikov, 2017-01-20 20:57:42

How to set a class for checkBox?

Good afternoon!
Question such: How to set a class at checkBox ()?
Here there is

<div class="checkbox checkbox-success">
                        <label>
                            <input type="checkbox" class="styled">
                            Remember me
                        </label>
                        </div>

Here is what I tried to do:
<div class="checkbox checkbox-success">
                    <label>
                        <?= $f->checkbox($form, 'remember',['class' => 'styled']); ?>
                        Remember me
                    </label>
                </div>

The Framework itself swears at the class
Tried through the template - it did not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-01-21
@Florens

Goodnight

<?= $form->field($model, 'rememberMe')->checkbox(['class' => 'test']) ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question