![](https://secure.gravatar.com/avatar/5abd9a2dd2cf41908fc0f11fe2552997.png?default=mp&rating=pg&size=250)
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!