Store nestedSortable into the Database
Opened this issue · 2 comments
iikun01 commented
Hi.. I'm in love with your nestedSortable.js.
I just wanna ask if it's possible to store the order of the nested list I created into the database?
praveenscience commented
Convert it into the array or serialised format, send it to the backend and update it by deserialising. :)
syrsly commented
Convert it into the array or serialised format, send it to the backend and update it by deserialising. :)
I can confirm that this not only works but is incredibly easy to accomplish with an ajax post. You can send the entire array as a post variable... assuming the amount of data is small enough. Then, your server side script can loop through the array elements and update the ones which have changes.