public function actionIndex() { $model = new Hotel('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Hotel'])) { $model->attributes = $_GET['Hotel']; } $this->render('index', array('model' => $model)); }