Checkbox Problem or my HTML?
Hi guys I.ve been debugging this for almost an hour. The problem is when checking the button it does not stay in active and wont stay on the checkbox
Image provided of desired solution. Active state + checkbox
https://codepen.io/pen?template=XWPyZMm
5 Replies
explain a bit more pls
I've seen the codepen
the checkbox seems to be working fine
you've got a couple of issues:
1) Buttons should not contain other interactive content like checkboxes
2) The buttons are submitting the form, which is causing the page to refresh and thereby resetting its state
the checkboxes only work properly if you click the checkbox itself, the issue happens when you click the label / rest of the button
it redirects to somewhere i think
it's submitting the form to the current page, which doesn't work on codepen
hmmmm
okee
gotcha
tnx