Ruby on Rails
Saturday, August 3, 2019
Sounds like you need some Javascript.
You should be able to use Javascript to manipulate a hidden field that will contain an array of items, or their ids. You will need to get your hands dirty with Javascript, I see no other "DOM-oriented" way to do it.
if you're not opposed to Jquery I'd just recommend jQuery UI's draggable which implements many hooks that will be good for you
-Jason
On Jul 20, 2019, at 9:24 PM, John Sanderbeck <bandor535@gmail.com> wrote:I understand that part Walter. I have done many nested forms. However, this is the first one with a drag and drop feature.The part I am struggling with is how to populate the array that gets passed back through the drag and drop events.I have the strong params setup and could easily just add a simple nested form, but I wanted to add the drag and drop as a feature so they could build the meals easily with an IPad.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment