django-tables2 icon indicating copy to clipboard operation
django-tables2 copied to clipboard

feature: example for checkbox selection and a submit action (e.g) adding to a basket/chart

Open markdoerr opened this issue 2 years ago • 2 comments

Dear django-tables2 developers,

I am struggling adding a checkbox column for submitting the selected items to e.g. a chart/basket.

How would one submit selected table columns to a view and do something with it in django ? Could you please add an example of this to the examples - I think many would be very greatful.

Thanks

markdoerr avatar Jul 04 '23 07:07 markdoerr

Hi there, So what we typically do is wrap the table in a form with a submit button (in the template), Once you click submit the checked boxes get added to the url as query params and you can process them as you see fit. image image image

JordanHyatt avatar Dec 10 '23 12:12 JordanHyatt

Thanks @JordanHyatt, for your hint. I will test this approach.

markdoerr avatar Dec 10 '23 17:12 markdoerr