[Fixed]-Select all checkboxes in django template

1👍

I found a simpler solution here.
** stack overflow: disable auto-submit on button click **
It explains that by html5 default a button is type=”submit”. The solution to the above problem is explained below.

<button type="button" onclick="select_all()">Select All</button>
👤Jeshli

0👍

You probably hate to unbind submit, then you can submit the form.

$('some_form').unbind('submit').submit()

This approach should cancel prevenDefault so you can submit the form.

👤Milano

Leave a comment