/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = Areaintrest::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'is_active' => $this->is_active, 'is_deleted' => $this->is_deleted, 'created_date' => $this->created_date, 'created_by' => $this->created_by, 'updated_date' => $this->updated_date, 'updated_by' => $this->updated_by]); $query->andFilterWhere(['like', 'area_intrest', $this->area_intrest]); return $dataProvider; }
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css" rel="stylesheet" /> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true&libraries=places"> </script> <div class="event-form"> <span class="label label-danger">Fields marked with * are mandatory</span> <p></p> <?php $form = ActiveForm::begin(['options' => ['id' => 'create-event-form']]); ?> <?php echo $form->field($model, 'interest_id')->dropDownList(ArrayHelper::map(Areaintrest::find()->all(), 'id', 'area_intrest'), ['prompt' => 'Select Event Category']); ?> <?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'description')->widget(CKEditor::className(), ['options' => ['rows' => 6], 'preset' => 'basic']); ?> <?php echo $form->field($model, 'location')->textInput(['class' => 'placepicker form-control']); ?>