nestedSortable icon indicating copy to clipboard operation
nestedSortable copied to clipboard

Store nestedSortable into the Database

Open iikun01 opened this issue 6 years ago • 2 comments

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?

iikun01 avatar Aug 02 '18 03:08 iikun01

Convert it into the array or serialised format, send it to the backend and update it by deserialising. :)

praveenscience avatar Aug 23 '18 08:08 praveenscience

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.

syrsly avatar Mar 27 '19 17:03 syrsly