Hey everyone,
I have made an form with alot of questions with checkboxes. Now i have one question in the form that the checkbox border need to be red if the checkbox is not valid. so not all of them. I tried alot of things with a webblock and with my junior CSS styling skills inside the widget but i didn't get the solution.
I think the solution has to be in CSS but i am not sure. So is my question is this possible? and if its possible how i add an boolean var to CSS?
[data-checkbox]:before {
Border-color: red;
}
This is what i need but then the [data-checkbox] need to be variable.
Thank you in advance!
Stefan
Hello Stefan,
This CSS sets the checkbox's border to red when you set it as invalid in your form validation logic:
input[type='checkbox'].not-valid:before { border: 1px solid red;}
Thank you CSS master