Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

how to add an icon? #38

Open
akula22 opened this issue Nov 23, 2017 · 3 comments
Open

how to add an icon? #38

akula22 opened this issue Nov 23, 2017 · 3 comments

Comments

@akula22
Copy link

akula22 commented Nov 23, 2017

how to add an icon?

@tonydspaniard
Copy link
Member

where?

@akula22
Copy link
Author

akula22 commented Nov 24, 2017

@demogorgorn
Copy link

<?= $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>';
                    }"),

                    ],

                ],
            ]);
            ?>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants