berkshirea
Technical User
Hi guys, I have the code below. It's working as I want it to be aside from the default popup message. Is it possible to change the message from "Please check this box if you want to proceed" to "Please select at least one box"
Thanks for any help.
Thanks for any help.
Code:
<html><head>
<style>
</style>
</head>
<body>
<script src="jquery.min.js"></script>
<form action="test.html">
<input type="checkbox" name="whatever" value="1" required="" class="required_group">
<input type="checkbox" name="whatever" value="2" required="" class="required_group">
<input type="checkbox" name="whatever" value="3" required="" class="required_group">
<input type="checkbox" name="whatever" value="4" required="" class="required_group">
<input type="submit" name="submit">
</form>
<script type="text/javascript">
$('form').on('click', '.required_group', function() {
$('input.required_group').prop('required', $('input.required_group:checked').length === 0);
});
</script>
</body></html>