<?PHP use yii\helpers\Html; use yii\widgets\ActiveForm; use blobt\widgets\DateRangePicker; $this->title = '测试'; $this->params['subtitle'] = '这是一个小小的测试'; $this->params['breadcrumbs'][] = $this->title; /* @var $this yii\web\View */ /* @var $model common\models\CategorySearch */ /* @var $form yii\widgets\ActiveForm */ ?> <?php $form = ActiveForm::begin([ 'action' => ['index'], 'method' => 'get', 'validateOnType' => true, ]); ?> <div class="col-sm-11"> <div class="dataTables_filter"> <?= $form->field($model, 'id', [ "template" => "{input}{error}", "inputOptions" => [ "placeholder" => "检索的id", "class" => "form-control" ], "errorOptions" => [ "class" => "error-tips" ] ]) ?> <?= $form->field($model, 'cat_name', [ "template" => "{input}{error}", "inputOptions" => [ "placeholder" => "检索类名", "class" => "form-control", ], "errorOptions" => [ "class" => "error-tips" ] ]) ?> <?= $form->field($model, "created_at", [ "template" => "{input}{error}", "errorOptions" => [ "class" => "error-tips" ] ])->widget(DateRangePicker::className()); ?> </div> </div> <div class="col-sm-1" style="padding: 0;"> <?= Html::submitButton('<i class="fa fa-filter"></i>', ['class' => 'btn btn-default']) ?> <?= Html::resetButton('<i class="fa fa-eraser"></i>', ['class' => 'btn btn-default']) ?> </div> <?php ActiveForm::end(); ?>