public function search($params) { $query = OrgnModel::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere(['id_orgn' => $this->id_orgn, 'create_by' => $this->create_by, 'update_by' => $this->update_by]); $query->andFilterWhere(['like', 'cd_orgn', $this->cd_orgn])->andFilterWhere(['like', 'nm_orgn', $this->nm_orgn])->andFilterWhere(['like', 'create_date', $this->create_date])->andFilterWhere(['like', 'update_date', $this->update_date]); return $dataProvider; }
* @var yii\widgets\ActiveForm $form */ ?> <div class="branch-form col-lg-6" style="padding-left: 0px;"> <?php $form = ActiveForm::begin(); ?> <div class="panel panel-primary"> <div class="panel-heading"> Branch </div> <div class="panel-body"> <?php echo $form->field($model, 'id_orgn')->dropDownList(ArrayHelper::map(Orgn::find()->all(), 'id_orgn', 'nm_orgn'), ['style' => 'width:200px;']); ?> <?php echo $form->field($model, 'cd_branch')->textInput(['maxlength' => 4, 'style' => 'width:120px;']); ?> <?php echo $form->field($model, 'nm_branch')->textInput(['maxlength' => 32]); ?> </div> </div> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);