Why does the button toggle the checkbox?
When you click on the checkbox, a form submit button appears. But by clicking on it, instead of submitting the form, it switches the checkbox state.
Tell me how to fix it.
Because your button lies inside the label, next to the checkbox. When you press the button, it turns out that you press the label, the checkbox switches accordingly. Either add the button somewhere outside the label, or intercept the event, see what was clicked, and if the button is clicked, do submit.
Personally, the first option seems more correct to me.Xander Garner
Because you have a class chackbox, you have display: block; stretches to full width.
You need to raise the button somehow above the block. We need to work with the z-index of the button and the checkbox.Delilah McGuire
To place the code, please use CodePen or similar tool. Thanks you!