JSFiddle - React, Tailwind, and code Playground
HTML
<form id="formId" name="formName" action="index.php" method="post">
<input name=entry>
<input type="checkbox" class="checkbox1">1
<input type="checkbox" class="checkbox2">2
<input type="checkbox" onclick="this.form.submit();">5
<input id="submitme" type="submit" name="submit" >
</form>
JavaScript
$(function(){
$(".checkbox1").click(
function(){
alert('checkbox 1 clicked');
}
)
$(".checkbox2").click(
function(){
$('#submitme').trigger('click');
}
)
});