Пример #1
0
<?php

use yii\web\View;
use common\models\poker\PokerLeague;
//use dosamigos\multiselect\MultiSelect;
\common\assets\ChoosenSelectAsset::register($this);
//русский язык подключаем
$js = "jQuery('.chosen_select').chosen();";
$this->registerJs($js, View::POS_READY, 'form-league');
?>
<br>

<div class="form-group">
	<?php 
echo $form->field($model, 'league_ids')->dropDownList(PokerLeague::getLeaguesListDropDown(), [$model->league_ids, 'class' => 'chosen_select', 'multiple' => true, 'data-placeholder' => 'Укажите лиги и турниры', 'style' => 'width:100%;min-height:30px;']);
?>
</div>


Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getLeague()
 {
     return $this->hasOne(PokerLeague::className(), ['leagueid' => 'leagueid']);
 }