Some of the checkboxes in my form are not checking when clicked
I've tried wrapping them with the label as this usually does the trick for people but this hasn't changed anything for me, even if I get rid of the text for each checkbox it still doesn't check. I'm not sure what else it could be.
<form action="register.php" method="post">
<h1 class = "h4">Favorite Player</h2>
<br><br>
<label><input type='checkbox' name='response1' value='response1'>Ronaldo</label>
<label><input type='checkbox' name='response2' value='response2'>Messi</label>
<label><input type='checkbox' name='response3' value='response3'>Ibra</label>
<label><input type='checkbox' name='response4' value='response4'>Me</label>
<br><br>
<h1 class = "h4">Favorite Color</h2>
<br><br>
<label><input type='checkbox' name='noise1' value='noise1'>Red</label>
<label><input type='checkbox' name='noise2' value='noise2'>Blue</label>
<label><input type='checkbox' name='noise3' value='noise3'>ME!</label>
<br><br>
<h1 class = "h4">Level of Cleanliness/Organization Preference </h1><br><br><br><br>
<input type='checkbox' name='room1' value='room1' class ='heads'><img src = "https://cdn-image.travelandleisure.com/sites/default/files/styles/1600x1000/public/1446151328/miami-header-dg1015.jpg?itok=eIwFd7q_" width = "250" height = "250" /><br>
<input type='checkbox' name='room2' value='room2' class ='heads'><img src = "https://images.musement.com/cover/0002/49/thumb_148242_cover_header.jpeg?w=1200&h=630&q=60&fit=crop" width = "250" height = "250"/> <br>
<input type='checkbox' name='room3' value='room3' class ='heads'><img src = "place.jpg" width = "250" height = "250"/>
<h1 class = "h4">Do you want a account?</h2>
<br><br><br><br>
<label><input type='checkbox' name='r1' value='r1'>Yes</label>
<label><input type='checkbox' name='r2' value='r2'>No</label>
<br><br>
<h1 class = "h4">Do you need a account?</h2>
<br><br>
<label><input type='checkbox' name='r3' value='r3'>Yes</label>
<label><input type='checkbox' name='r4' value='r4'>No</label>
<br><br>
<br><br>
<input type="submit" name="createaccount" value="Create Account">
</form>
To have the checkboxes check when clicked
Aucun commentaire:
Enregistrer un commentaire