Default mandatory question

More
2 years 11 months ago #116083 by wilmslow3
wilmslow3 created the topic: Default mandatory question
Is there a way to make every question in a survey Mandatory by default. It is rare that we will conduct a survey with any of the questiosn non-mandatory...

I presume there is some settings in a config file hidden away during the install?

Please Log in to join the conversation.

More
2 years 11 months ago #116089 by Mazi
Mazi replied the topic: Default mandatory question
Unfortunately such a setting doesn't exist. The easiest way would be to add all questions and then run a DB update to set the appropriate flag for all questions of survey XYZ.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: wilmslow3

Please Log in to join the conversation.

More
2 years 11 months ago #116147 by wilmslow3
wilmslow3 replied the topic: Default mandatory question
Thanks Mazi, I may try to see if I can run some PHP when the the question is created that updates the flag at the time you create the question.

Please Log in to join the conversation.

More
2 years 11 months ago #116148 by Ben_V
Ben_V replied the topic: Default mandatory question
Have a look to:
/application/controllers/admin/question.php

Search (around line #770):
$eqrow['mandatory'] = 'N';

and switch 'N' to 'Y'

Obviously this change may be overwritten by any LS major update...

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: wilmslow3

Please Log in to join the conversation.

More
2 years 11 months ago #116149 by wilmslow3
wilmslow3 replied the topic: Default mandatory question
Thanks Ben, thats exactly the kind of hack I was after :-)

Please Log in to join the conversation.

More
2 years 11 months ago #116150 by Ben_V
Ben_V replied the topic: Default mandatory question

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
2 years 11 months ago #116151 by Mazi
Mazi replied the topic: Default mandatory question

wilmslow3 wrote: Thanks Mazi, I may try to see if I can run some PHP when the the question is created that updates the flag at the time you create the question.

You may even be able to automate this without additional coding by creating a trigger at the DB.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!