Open akula22 opened 6 years ago
where?
<?= $form->field($model, 'location')->widget(SelectizeDropDownList::className(),[
'name' => 'photos',
'value' => $model->location,
'items' => $data,
/*'loadUrl' => ['quote/list'],*/
'clientOptions' => [
'valueField' => 'id',
/*'persist' => false,*/
'openOnFocus' => true,
'preload' => true,
'create' => true,
'createOnBlur' => true,
'labelField' => 'name',
'searchField' => ['name'],
'render' => [
'option' => new \yii\web\JsExpression("function(item, escape) {
return '<div class=\"option\"><img src=\"" . Yii::$app->request->getBaseUrl() . '/images/quotes/' . "'+ item.name +'\" alt=\"'+escape(item.name)+'\" height=\"42\" width=\"42\"><span style=\"margin-left:15px;\">'+escape(item.name)+'</span></div>';
}"),
],
],
]);
?>
how to add an icon?