Labels Go Green When Form Submitted

I’ve noticed that some of my labels go green when I submit a form, and it seems to be the labels on checkboxes which are styled as a switch.

Is a normal this part of the Bootstrap 4 validation process?

Does anyone know how to stop them doing that - it looks kind of strange!

Hi Antony, can you post a screenshot of what you mean and perhaps your form element code?

I’m sure there are better ways, but you could just add this css and it will work…

.custom-control-label{ color: gray !important }

  • using whatever colour you want your text to be in the label

That’s for the custom checkbox class. Naturally this just overrides the text colour and uses the important tag. Which stops the bootstrap validation classes being applied.

Probably shouldn’t use !important but its one option.

I’ll see if i can find the non-destructive way of doing it