Are there alternative methods for maintaining the Bootstrap 4 custom checkbox design without utilizing the input's ID and label's 'for' attribute? The styling for when the box is checked disappears if these are removed.
For instance:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="customControlValidation1" required>
<label class="custom-control-label">Check this custom checkbox</label>
</div>
I attempted enclosing the input within a label, but saw no change in behavior. Is there an approach to bypass assigning a static ID to the input while still achieving the styled Bootstrap checkbox? Appreciate any insights!