Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
markdoerr opened this issue Jul 4, 2023 · 2 comments

Comments

@markdoerr
Copy link

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

@JordanHyatt
Copy link
Contributor

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

@markdoerr
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants