I'm new to customizing themes in LimeSurvey, but thought I'd share a tip.
The default behavior (at least for the bootswatch theme) is to display the regex validation text in red if the entry is invalid, and blue (with same text) if it is valid ie.:
Code:
Please check the format of your answer.
I thought some users might find this a bit confusing: what I wanted is for the invalid regex text to only appear if the text entry was invalid (in this case for an email address). If a regex valid email address was entered, I wanted no message to appear.
To make this happen, in my custom bootswatch theme, I added the following entry to my custom.css file:
This question is asked rather often.
Now there is a thread we can link to answering, instead of writing the same several times.
But please, pay attention to use the correct syntax of your code insertion.
It's better readable if you use "css" for css code, "javascript" for scripts, etc.
Thankyou Joffm, and sorry I didn't use the CSS code type.
I didn't find the answers to my question before I posted the topic, but acknowledge what I was asking I expected to be a pretty common thing, and my searching was obviously a bit 'sub-optimal'. I'll now go and see how other people solved this issue - as always with .css and HTML there are usually multiple ways to skin the cat as is said in English!
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.