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
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!