pupdogg

Joined

1,010 Experience
3 Lessons Completed
1 Question Solved

Activity

Posted in How to use Hotwire in Rails Discussion

Only 2 more major changes and Rails is back to good old days: swap Webpack for Snowpack and ActionCable for AnyCable

Posted in Rails + Javascript question

I would recommend accumulating the products and their assocaited quantities as objects inside a local JS array. When the end-user presses "send", you can catch that event and build/send a FormData() object via Rails.ajax. See my example over at JSFiddle @ https://jsfiddle.net/pupdogg/okagmx6p/8/ as I'm not sure how to embed it here. I hope this helps!