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 am using TbEditableDetailView in Yii and I have an editable field that generates a html Select - The select list is from a different model. I am using the following code
This will sort in alphabetical order but I need the id from the TradeTitle table not the name. It appears that I cannot sort the source for the editable select. Any suggestions as this would normally work in a basic dropdownlist in a form.
The text was updated successfully, but these errors were encountered:
I run the same code, and this one worked for me...
'source'=>CHtml::listData(TradeTitle::model()->findAll(array('order' => 'name')), 'id', 'name')
should work
what version you are using ...?
are you still facing the problem?
I am using TbEditableDetailView in Yii and I have an editable field that generates a html Select - The select list is from a different model. I am using the following code
It is the TradeTitle list I want to order by name not by id. I have tried
However this will not sort by name. If I use
This will sort in alphabetical order but I need the id from the
TradeTitle
table not the name. It appears that I cannot sort the source for the editable select. Any suggestions as this would normally work in a basic dropdownlist in a form.The text was updated successfully, but these errors were encountered: