Так?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<form method="post" action="action.php" name="checkbox_form" class="checkbox_form">
<input type="checkbox" name="ch_1" class=my_checkbox" value="ch_1" checked>
<input type="checkbox" name="ch_1" class="my_checkbox" value="ch_1" checked>
<input type="checkbox" name="ch_2" class="my_checkbox" value="ch_2">
<input type="checkbox" name="ch_2" class="my_checkbox" value="ch_2">
<!-- И тут ещё куча копий -->
</form>
<script>
window.onload = function(){
var elems = document.querySelectorAll('.my_checkbox');
for(var i = 0; i < elems.length; i++){
elems[i].onchange = go;
}
function go() {
var name = this.getAttribute('name');
var check = this.checked;
checkAll(name, check);
}
function checkAll(name, check){
var names = document.getElementsByName(name);
for(var k = 0; k < names.length; k++){
names[k].checked = check;
}
// Тут отправляем форму
}
}
</script>
</body>
</html>