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