⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

set_relation_n_n priority field when add



Abdullah Alshiekha
  • profile picture
  • Member

Posted 14 May 2016 - 16:17 PM

Hello
I have a question about set_relation_n_n priority field 
my code is :

$crud->set_relation_n_n('Bus_Stops','busstops_route','busstops','route_id', 'busstops_id','{busstops_name}','order');

when I add a new item it is by default taking alphabetical order of the busstops_name field but when I drag and drop any busstop up or down in the menu it is taking the order as i want . 

my question is how can I stop default ordering by busstops_name field and make it take the order as I clicked on the items

I have attached the photo 
Thank You in advance 

[attachment=1114:Captussssssre.PNG]