guild/backend/modules/questionnaire/views/answer/_search_by_questionnaire.php
2021-11-12 14:30:01 +03:00

35 lines
930 B
PHP

<?php
use backend\modules\questionnaire\models\Questionnaire;
use kartik\select2\Select2;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\modules\questionnaire\models\AnswerSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="answer-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'questionnaire')->widget(Select2::className(),[
'data' => Questionnaire::find()->select(['title', 'id'])->indexBy('id')->column(),
'options' => ['placeholder' => 'Выберите анкету'],
'pluginOptions' => [
'allowClear' => true
],
])->label('Анкета') ?>
<div class="form-group">
<?= Html::submitButton('Поиск', ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>