TbSelect2

 超哥  Yii1  2015-11-18  2531  发表评论
<?php
$this->widget(
'booster.widgets.TbSelect2',
array(
'model' => $model,
'attribute' => 'visit_country',
'val' => $model->visit_country,
'data' => Country::model()->getAll(),
'htmlOptions' => array(
'multiple' => true
),
'options' => array(
'placeholder' => '请选择',
'width' => '100%',
// 'ajax' => array(
// 'url' => Yii::app()->createUrl('/country/allByKey'),
// 'dataType' => 'json',
// 'data' => 'js:function(term, page) { return {term: term }; }',
// 'results' => 'js:function(data) { return {results: data}; }',
// 'cache'=> "true"
// ),
),
)
);
?>
所有评论
加载评论 ...
发表评论