<?php $form = ActiveForm::begin([
'options'=>['enctype'=>'multipart/form-data','class' => 'form-horizontal'],
'fieldConfig' => [
'template' => "{label}
<div class="col-lg-5">{input}</div>
<div class="col-lg-3">{error}</div>",
'labelOptions' => ['class' => 'col-lg-1 control-label'], //修改label的样式
]
]); ?>