public function actionTime($id) { $res = Time::find()->where([$id => '0'])->asArray()->all(); echo Json::encode($res); }
?> <div class="session-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'hall_id')->dropDownList(\yii\helpers\ArrayHelper::map(\common\models\Hall::find()->all(), 'id', 'hall_name'), ['prompt' => 'Select Hall']); ?> <?php echo $form->field($model, 'start_time')->dropDownList(\yii\helpers\ArrayHelper::map(\common\models\Time::find()->where(['6' => '0'])->all(), 'time_id', 'time_list'), ['prompt' => 'Select time', "disabled" => "disabled"]); ?> <?php echo $form->field($model, 'movie_id')->dropDownList(\yii\helpers\ArrayHelper::map(\common\models\Movie::find()->all(), 'id', 'name'), ['prompt' => 'Select Movie', "disabled" => "disabled"]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end();