1
My idea and the next one, I think if you do this kind of validation with js will get heavier since you will have to send more code and perform more process! This validation is not so important then not the need. That idea is convenient or very wrong?
.seletor{
width: 160px;
height: 60px;
margin-bottom: 10px;
background-color: #9b9b9b;
}
#r1:checked .seletor:first-child{
background-color: orange;
}
#r2:checked .seletor:nth-child(2){
background-color: purple;
}
#r3:checked .seletor:nth-child(3){
background-color: yellow;
}
<input type="radio" name="c_1" id="r1">
<input type="radio" name="c_1" id="r2">
<input type="radio" name="c_1" id="r3">
<label for="r1">
<div class="seletor">ooo</div>
</label>
<label for="r2">
<div class="seletor">ooo</div>
</label>
<label for="r3">
<div class="seletor">ooo</div>
</label>
To my mind If the color eh only for the user experience and a visual feedbacks vc do not need to do database validation...
– hugocsl