How to colour a field red?

peterraeves
Mega Guru

When a field is mandatory but not filled in, the label blinks for 2 seconds and the field becomes red. I want to replicate this behaviour. I found that g_form.flash does the former, now how would I be able to do the latter?

6 REPLIES 6

Peter, Did I understand this time or again I got it wrong?


A snapshot will be helpful what you are trying to achieve.


You can easily replicate this on your instance.



1. Keep a mandatory field empty


2. Save


3. See what happens to the field



I want to do what happens there, without having to make the field mandatory, because I want this behaviour only for certain values, instead of the empty value.