<div class="p-3">
<form id="myform" action="https://postman-echo.com/post" method="post">
<div>
<input type="checkbox" name="agree" id="agree_checkbox" value="yes" />
<label for="agree_checkbox">I agree to the terms and conditions</label>
<div style="display:none; color:red" id="agree_chk_error">
Can't proceed as you didn't agree to the terms!
</div>
</div>
<div>
<input type="submit" name="submit" value="Submit"/>
</div>
</form>
</div>
$("#myform").on("submit",function(form)
{
if(!$("#agree_checkbox").prop("checked"))
{
$("#agree_chk_error").show();
}
else
{
$("#agree_chk_error").hide();
}
return false;
})