You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2018. It is now read-only.
Hi there! First of all I'd like to thank you for the extension, really well done.
I'm having some trouble with the active Dropdown List and I think you can probably help me out.
So I have a CActiveForm and a $user model. When I'm on the create action for that model, the 'playerLevel' attribute in my view as a drop down list. The view code is as follows:
HTML
``` html
really really high
really really low
```
jQuery
``` javascript
$('#User_playerLevel').select2({'placeholder':'This is a placeholder','allowClear':true});
```
My problem is that, since it is a create action, the model's attributes are empty and so, I'd expect "This is a placeholder" to show up straight away, but it doesn't. Instead, the first value on the list is automatically selected. Also, I can't clear the value.
Edit: If I change it to an activeMultiSelect() it behaves perfectly.
Any hints?
Thanks in advance for your time!
The text was updated successfully, but these errors were encountered:
Hi there! First of all I'd like to thank you for the extension, really well done.
I'm having some trouble with the active Dropdown List and I think you can probably help me out.
So I have a CActiveForm and a $user model. When I'm on the create action for that model, the 'playerLevel' attribute in my view as a drop down list. The view code is as follows:
This generates:
My problem is that, since it is a create action, the model's attributes are empty and so, I'd expect "This is a placeholder" to show up straight away, but it doesn't. Instead, the first value on the list is automatically selected. Also, I can't clear the value.
Edit: If I change it to an activeMultiSelect() it behaves perfectly.
Any hints?
Thanks in advance for your time!
The text was updated successfully, but these errors were encountered: