How to get values from a table with rowsgroup through a controller?

As what the title says. Is there some kind of approach to do this?

:wave:

What’s are “table” and “rowsgroup” in this context? And what values do you want to get?

1 Like

Take this as an example,

(picture from https://www.gyrocode.com/articles/jquery-datatables-row-grouping-and-checkboxes/)

I have a checkbox column. If I checked the checkboxes (grouped rows) and let’s say I have a button for submit, once submit, all data that is checked from the table is passed through the controller.

Soundls like you’d need a checkbox for each group.

I’m already done making checkbox to a group. My concern now is that how can I submit checked rows going to the controller?

Well phoenix can accommodate anything so it depends on ‘how’ you want to submit it from the client side?

Something like unpoly can let you do real-time submission per checkbox. Some custom javascript could do it easily. Something like the Elixir Phoenix Drab library can handle it from the server side (pretty gloriously at that). Lots and lots and lots of ways, all depends on what you prefer. :slight_smile:

2 Likes