{{ use('yii/widgets/ActiveForm') }} {% set form = active_form_begin({ 'id': 'login-form', 'action' : '/form-handler', 'options': { 'class': 'form-horizontal', } }) %} {{ form.field(model, 'firstName') | raw }} <div class="form-group"> <div class="col-lg-offset-1 col-lg-11"> {{ html.submitButton('Login', { 'class': 'btn btn-primary', }) | raw }} </div> </div> {{ active_form_end() }}