<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\Prizes;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model common\models\Winner2021Search */
/* @var $form yii\widgets\ActiveForm */

?>

<div class="winner2021-search">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
    ]); ?>
    
<?php 
$countries=Prizes::find()->all();
//use yii\helpers\ArrayHelper;
$listData=ArrayHelper::map($countries,'id','name');

echo $form->field($model, 'fk_prize_id')->dropDownList(
        $listData,
        ['prompt'=>'Select...']
        );
?>

   

    <div class="form-group">
        <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
