Without the hidden input, the check works fine, but not hidden.
I need to make some adjustments to make it work, but I don't know what adjustments are necessary.
.check-item {
margin-bottom: 10px;
display: inline-block;
position: relative;
margin-top: 5px;
}
.check-item input[type='checkbox'] {
display: none;
}
.check-item label:before {
content: " ";
display: inline-block;
position: relative;
top: 3px;
margin: 0 10px 0 0;
width: 16px;
height: 16px;
border-radius: 4px;
border: 1px solid #000;
background-color: #FFF;
}
.check-item input[type=checkbox]:not(:checked)+label,
.check-item input[type=checkbox]:checked+label {
cursor: pointer;
}
.check-item input[type=checkbox]:checked+label:after {
position: absolute;
top: 3px;
left: 3px;
content: "X";
display: block;
color: #026492;
font-weight: 600;
}
<!-- WORK -->
<div class="check-item">
<input type="checkbox" id="dS0" name="destPapel" value="Destin" />
<label for="dS0"><span>Destin</span></label>
</div>
<!-- NOT WORK -->
<div class="check-item">
<input class="check" type="checkbox" id="pS0" name="pidPapel" value="Propri"/>
<input type="hidden" name="_pidPapel" value="on">
<label for="pS0"><span>Propri</span></label>
</div>
Above you have the two options and the css