G
G
grippin2015-07-09 14:28:43
css
grippin, 2015-07-09 14:28:43

How can I set CSS class {input} in templat?

<?= $form->field($model, 'username', [
                'template' => '<p class="fieldset"><span class="label-input">Your Username</span><label class="image-replace cd-username" for="signup-username"><i
                        class="fa fa-user"></i></label>{input}<span class="cd-error-message">Error message here!</span></p>',
            ]); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
telepk, 2015-07-09
@grippin

www.yiiframework.com/doc-2.0/yii-widgets-activefie...

<?= $form->field($model, 'username', [
    'inputOptions' => ['class' => 'custom-class']
]); ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question