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 #134721 by max12
Hi there,

I want subjects in an experiment to work on a right answer for a question. The correct answer is validated. The problem is now that subjects could start guessing, since if they type in the wrong answer, the field turns red, even before they hit the continue button. They simply need to type in different answers until the field does not run red. I would like to prevent the field from turning red if the answer is not the validated one. Is there a way to do that? This would force subjects to hit “continue” if they want to find out, whether their solution is in fact correct. I have a small follow up question: Is it possible to build in a time delay? So if subjects have typed in a wrong solution they stay on the same page (because their solution is not the validated one), but they cannot immediately type in a new answer, but have to wait something like ten seconds? Many thanks for your help!
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 #134727 by DenisChenu
Replied by DenisChenu on topic Red MArking when wrong answer after validation
It's in template. Depend of your template, search for .error part in template.css, first try to remove it.

Best is to use a html dev helper (firebug for example).

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 #134733 by max12
Thank you so much! So I looked in the template list (I have version 2.00). I find some called blueendgrey, citronade for example. When I open the template list, default is marked. Only the template "experiments" allows me to actually search for template.css. Is this normal? When I search in CSS I find this:

.warning {
display:block;
}
.error,.errormandatory,.warningjs {
color: red;
}
.errormandatory,.warningjs {
font-size: 12px;
font-weight: 700;
}

Is this correct? Would I delete everything of it and then save?

Many thanks, Max
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago #134736 by tpartner
Replied by tpartner on topic Red MArking when wrong answer after validation

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #134743 by max12
I can delete it. I can copy the Default template and delete the section in the copied template. Now I guess I have to tell the survey , which si already programmed to us the new altered default template?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago #134778 by tpartner
Replied by tpartner on topic Red MArking when wrong answer after validation

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #134781 by max12
May be the problem is too simple. However, I find in the manual how I can produce a new template, but not how I could actually use that template for an existing survey. I created a new template, supposedly deleted the red error feedback, but cannot use the new template.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago - 8 years 6 months ago #134816 by tpartner
Replied by tpartner on topic Red MArking when wrong answer after validation
Assuming you have the correct permissions - Survey properties --> General settings --> Presentation & navigation.


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 8 years 6 months ago by tpartner.
The topic has been locked.
  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #134837 by max12
Ok perfect :)! I found it and can now switch the template to the one I customized.

I deleted the error warnings I posted above in the template.CSS. But I still get the red warning, if I enter a wrong answer. I also found this section and deleted it.

/* Tips / Validation Messages */
/* If the question is invalid, but has not been submitted, give it a pleasant warning color */
div.em_num_answers.good {
color: green;
}

/* If it is still invalid after submit, flag it in red */
.input-error div.error {
color: red;
display: block;
}


However, I still get the red underlining if a wrong answer is tryped in. Any ideas?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago #134839 by tpartner
Replied by tpartner on topic Red MArking when wrong answer after validation
You will need to use a developer tool like Firebug for Firefox to see what styles are affecting the element.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #134879 by max12
Hey, I used firebug now. I opened up the page I want to change in the browser and identified the two elements that affect the item. Here s one of them:
Once I delete the two items with Firebugs on the particular page, the the red warning is not shown if I enter a wrong input.
So I deleted the two items in the customized template and told limesurvey to us the customized template. However, the red warning again shows up. Whn I look in the cusomized template the two items are indeed deleted.
The topic has been locked.
  • max12
  • max12's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #134881 by max12
I have it! It seems you nede to copy the template, then make all changes and only then let the survey use the newly created template. It sems you cannot make the changes when the survey is already using the template. In that case the changes do not appear in the survey. Many thanks for your help!

Do you also have an idea fr the second question? How could I delay the appearance of the answer field by a few seconds, when a subjects typed in a wrong answer? I want to prevent guessing. so if the waiting period is long enough guessing the anser is not worthwhile.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose