I found a really explanatory blog about Dojo DND and this started my basis of trying to implement a solution. However, their blog article didn’t address how to submit all of that data through a form - it was simply a live update and utilization of DND components.
What you see above is the two DND divs (
cartContainer) and an unordered list of buttons (see
ul class="actions"). This is not wrapped in a form, but is almost entirely driven by the Dojo engine. In short, I am able to drag-n-drop objects from either the
cartContainer. I click either the Cancel or the Save button to continue.
The Save button is the key - it’s onClick method calls
submitModuleChaptersAction(). Let’s take a look at what that’s doing.
This method fetches each of the nodes in the
cartNode Dojo ID (aka
Oh yea, what form?
This is the dijit form that I use to add new input elements. Likely I could have used a regular form, but I don’t really have the time to test it.
Hope this helps!