Welcome Guest, Not a member yet? Register   Sign In
Drag and Drop array problems :s

[eluser]Steve Goodwin[/eluser]
Hi All,

So my current problem is I implementing a new piece of functionality for my client and I've hit an annoying problem. This is using the jQuery drag and drop and sortable methods, this isn't the problem its PHP that is causing me the headaches at the moment.

If you look at this image It will make it more transparent as to what i'm actually on about:


So when I load this page up I have a foreach on my modules table which outputs all the modules the client can attach to the page. When I load these back up to be edited I check the another array stored in the pages content field to see weather the module has already been added to the page, if it has the client can manage it.

The problem i'm facing is that when the form is submitted and there are other errors on the page, the modules aren't displayed back in the order the client may have re-ordered them while editing the page using the drag and drop handles on each module <li>

Is there a simple fix here as I want the modules to appear in the order they were setup on my add page and any modules not on the page but available to appear below, but taking into account that the page could error and the modules would need to still maintain there state while the user fixes the error.

Thanks in advance...

Messages In This Thread
Drag and Drop array problems :s - by El Forum - 08-16-2012, 04:02 AM

Theme © iAndrew 2016 - Forum software by © MyBB