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
I have a problem with my Yii2 Select2 field because it's not retrieving inserted values from the database, showing the placeholder all the time. I tried using a method to retrieve the inserted values from the database and put them in the 'value' field attribute, but when saving the form they resulted in duplicate entries, meaning that the real records are still in the field but kinda hidden. What can I do about it to show the inserted values in the Select2?
I have a problem with my Yii2 Select2 field because it's not retrieving inserted values from the database, showing the placeholder all the time. I tried using a method to retrieve the inserted values from the database and put them in the
'value'
field attribute, but when saving the form they resulted in duplicate entries, meaning that the real records are still in the field but kinda hidden. What can I do about it to show the inserted values in the Select2?This is the form field
I tried adding inside
options[ ]
something like'value' => methodToGetInsertedValues()
but as I said before, it gives error of duplicate entriesThe text was updated successfully, but these errors were encountered: