How to disable wrap checkbox with .form-group in Yii2

How to disable wrap checkbox with div.form-group in Yii2 using yii\bootstrap\ActiveForm?

That I need (AdminLTE login page template):

<div class="row">
    <div class="col-xs-8">
        <div class="checkbox icheck">
            <label>
                <input type="checkbox"> Remember Me
            </label>
        </div>
    </div>
    <div class="col-xs-4">
        <button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
    </div>
</div>

I tried:

<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
    ...
    <div class="row">
        <div class="col-xs-8">
            <?= $form->field($model, 'rememberMe')->checkbox(); ?>
        </div>
        <div class="col-xs-4">
            <?= Html::submitButton('Sign In', ['class' => 'btn btn-primary btn-block btn-flat', 'name' => 'login-button']); ?>
        </div>
    </div>
<?php ActiveForm::end(); ?>

It render to:

<div class="row">
    <div class="col-xs-8">
        <div class="form-group field-loginform-rememberme">
            <div class="checkbox">
                <label>
                    <input type="checkbox" name="LoginForm[rememberMe]" value="0"> Remember Me
                </label>
                <p class="help-block help-block-error"></p>
            </div>
        </div>
    </div>
    <div class="col-xs-4">
        <button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
    </div>
</div>

Everything is good except the extra wrapper <div class="form-group field-loginform-rememberme">
How to remove this extra wrapper?


Download how.to.disable.wrap.checkbox.with.form.group.in.yii2.zip
Direct Link


Download


Download how.to.disable.wrap.checkbox.with.form.group.in.yii2.zip
Mediafire


Download


Download how.to.disable.wrap.checkbox.with.form.group.in.yii2.zip
Netload


Download


Download how.to.disable.wrap.checkbox.with.form.group.in.yii2.zip
Letitbit


Download


Download how.to.disable.wrap.checkbox.with.form.group.in.yii2.zip
Zippyshare


Download

Both comments and pings are currently closed.

Comments are closed.