I cant seem to get this sort order working, but from everything i've read, it should be working!
The database has a table with form field contents in, so for example to select age in a drop down, it finds all the rows with an id_field value of 2, and puts them in the drop down, great.
id id_field value
1 2 18
2 2 19
3 2 20
4 2 21
This is the dropdown code
<?php echo $form->dropDownList($model,'client_2_age', CHtml::dropDownList(FormFields::model()->findAll("id_field=2",array('order' => 'value ASC')), 'value', 'value'), array('empty'=>'Select age')) ?>
I thought it was working, until someone 'kindly' pointed out i hadnt included the age "58" so i added it to to DB, and sure enough it appeared in the dropdown, but as the last entry.
I cant get it to position itself between 57 and 59!
I obviously entered them into the DB in the correct order, so thought it was working, doh!
Any help appreciated.
ps sorry about the icons, they are keeping me 'up beat' lol