vierundzwanzig wrote:
I updated my "My little Test-Survey". The "Hide tip" option seems to work as mentioned. But I have the example donate question in the survey and it seems that the validation of the regex and/or EM expression seems to happen every time you answer a question even it you don't really enter anything in the donate question. So it is marked red but you even haven't answerd the question at all.
That's actually the intended behavior.
By default, if you have a regular expression validation, you can still leave the question blank. However, you added this em_validation_q criteria:
if(is_numeric(this), this > 50, substr(this, 1) > 50)
That criteria will fail if the question is blank, so EM is accurately flagging the question in red so that you know you have to answer it. To allow blank entries, you can adjust the em_validation_q to this:
if (is_empty(this),1,if(is_numeric(this), this > 50, substr(this, 1) > 50))
You may be asking a related question - is there a way to avoid flagging questions as red until the person navigates past that question. Eventually there may be a way to do that by using the qseq (question sequence) attribute, but I expect people may want that built in rather than needing to tailor the
em_validation_q equation. If that is a desirable feature, please add it to ideas.limesurvey.org so we can get some votes for/against it.
/Tom