Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Changing the error message for mandatory questions

Changing the error message for mandatory questions 4 years 5 months ago #77016

Hi,

Is it possible to change the error message that a user gets if he hasn't answered a mandatory question?
If so, where and how? Couldn't find it in the template editor.

I would also like to change the error message a user gets if he hasn't answered a 'other' mandatory option.

Thanks!
David
The administrator has disabled public write access.

Changing the error message for mandatory questions 4 years 5 months ago #77028

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9305
  • Thank you received: 1330
  • Karma: 386
Hello,

You can change the translation file, it's for all survey.

For one survey, you have to make your own javascript.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Changing the error message for mandatory questions 4 years 5 months ago #77043

I see.
Is there any chance you could guide me through the js option?
Thanks a lot,
David
The administrator has disabled public write access.

Changing the error message for mandatory questions 4 years 4 months ago #78914

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9305
  • Thank you received: 1330
  • Karma: 386
Hello,

For question 212, a short text question, in question text, maybe something like this:
$(document).ready(function(){
$("#movenextbtn").click(function(){
  if($("#question212 input.text").val()==""){
	alert("the question 212 is mandatory");
  }
});
});
It's the quick way.

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Changing the error message for mandatory questions 4 years 4 months ago #78931

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5984
  • Thank you received: 368
  • Karma: 260
davidspivak wrote:
I see.
Is there any chance you could guide me through the js option?
Thanks a lot,
David
Instructions how to update the LimeSurvey translations can be found at docs.limesurvey.org/tiki-index.php?page=...anslating+LimeSurvey

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.307 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form