Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Red MArking when wrong answer after validation

  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #134958 by max12
Here is the section of the template.css that needs to be deleted:

input.em_sq_validation.error, textarea.em_sq_validation.error {
color: black;
background-color: pink;
}
The topic has been locked.
  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #135032 by max12
Now a follow up problem occurs: If the participant types in the wrong answer a helping note appears stating that the subject should rethink the format of her input. This hint appears even before the subjects has pressed continue. So I need to delete it. With Firebug I find the following section to cause the hint:

<div class="em_regex_validation error" id="vmsg_3295_regex_validation">Bitte überprüfen Sie das Format Ihrer Antwort.</div>

However, I did not find the section in the template.css and therefore cannot delete it. Any idea where I could find the section to delete it? Many thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
8 years 6 months ago #135086 by DenisChenu
Replied by DenisChenu on topic Red MArking when wrong answer after validation
Hi,

input-error is the class added to the question when trye to submit an invalid part.

If you want to hide a "helper" before submitting and show it only after error : try this;
- Set question help to hidden
- Put this in your template
Code:
.hide-tip .error {display: none;}
.input-error .hide-tip .error {display: block;}
/* with or witout hide tipe */
div.em_regex_validation.error{display: none;}
.input-error div.em_regex_validation.error{display: none;}

ANd maybe is time to look at css manual and system : www.w3.org/Style/CSS/ .

Denis

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.
The topic has been locked.
  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #135092 by max12
So I go into the question then under section "advanced settings", "display" and then "hide tip"? I posted a screen shot below. I copied you programming in the template. many thanks!!

I now get the helper information after subjects hit continue, if their answer was wrong. that is very nice! so when subjects made a mistake, they learn that made a mistake and ha ve to try again. However, the problem is that the tip dinimishes in the moment subjects type in a corrcet answer and before they hit the continue button. So they could still try out all kind of ansers until the tip diminishes; when it does they know that they have the right answer. So the tip should be displayed until participants have hit the continue button; it should not react to whether the input is right or not. If the subjects get the answer right they move on to the next screen, if they get it wrong, they stay on the same screen and get the helper tip. Is there a way to get that?
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose