- Posts: 19
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Defaulting all question types to mandatory
- cgrewal94
- Topic Author
- Offline
- New Member
Less
More
9 months 1 day ago #245197
by cgrewal94
Defaulting all question types to mandatory was created by cgrewal94
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.6.28
Own server or LimeSurvey hosting: Own server
Survey theme/template: Custom template
==================
Hi there,
I was wondering how we are able to set questions to be mandatory by default? Also, I was wondering how to change the default question from long free text to radio?
Thanks!
Your LimeSurvey version: 5.6.28
Own server or LimeSurvey hosting: Own server
Survey theme/template: Custom template
==================
Hi there,
I was wondering how we are able to set questions to be mandatory by default? Also, I was wondering how to change the default question from long free text to radio?
Thanks!
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12940
- Thank you received: 3979
9 months 21 hours ago #245201
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Defaulting all question types to mandatory
Hi,
you change the default question type in your personal settings.
And to set the "mandatory" status of some or all questions use the "list questions" options.
Joffm
you change the default question type in your personal settings.
And to set the "mandatory" status of some or all questions use the "list questions" options.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- cgrewal94
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 1
9 months 13 hours ago #245217
by cgrewal94
Replied by cgrewal94 on topic Defaulting all question types to mandatory
Thanks!
Is there no way to have the questions be mandatory by default on creation of the question?
Is there no way to have the questions be mandatory by default on creation of the question?
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
9 months 11 hours ago #245228
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Defaulting all question types to mandatory
Some years (and LS versions ago) you could do it by hacking the code:
forums.limesurvey.org/forum/can-i-do-thi...t-mandatory-question
I don't think this is possible anymore, as the questions are not all in one php file anymore, but separate (afaik).
And of course, hacking the code means that things will be overwritten with updates, which leads to people not update, which is not a good idea for a software that potentially collects private data and is accessible via the internet by default.
forums.limesurvey.org/forum/can-i-do-thi...t-mandatory-question
I don't think this is possible anymore, as the questions are not all in one php file anymore, but separate (afaik).
And of course, hacking the code means that things will be overwritten with updates, which leads to people not update, which is not a good idea for a software that potentially collects private data and is accessible via the internet by default.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- marcgold
- Offline
- Premium Member
Less
More
- Posts: 85
- Thank you received: 9
5 months 2 weeks ago - 5 months 1 week ago #252037
by marcgold
Replied by marcgold on topic Defaulting all question types to mandatory
Since updating to the latest version of the V5 Branch (5.6.44) the code hack that Holch referred to no longer works as the files have been updated.
Like others, I never create surveys without mandatory questions, so having this as a variable that we could set somewhere would be super useful.
After doing a little digging around I have found that there is a single file that needs to be adjusted to make it happen.
WARNING: Its Still a code hack - so be careful and make sure you update regularly and replace the hack if it gets overwritten.
Edit the file: /application/models/QuestionCreate.php
As of 5.6.44 the line you want is Line 43. (might change in later versions)
Change:
'mandatory' => 'N',
to
'mandatory' => 'Y',
Done!
18/11/23 Quick update to this - the instructions are Valid as of Version 6.3.5 as well
Like others, I never create surveys without mandatory questions, so having this as a variable that we could set somewhere would be super useful.
After doing a little digging around I have found that there is a single file that needs to be adjusted to make it happen.
WARNING: Its Still a code hack - so be careful and make sure you update regularly and replace the hack if it gets overwritten.
Edit the file: /application/models/QuestionCreate.php
As of 5.6.44 the line you want is Line 43. (might change in later versions)
Change:
'mandatory' => 'N',
to
'mandatory' => 'Y',
Done!
18/11/23 Quick update to this - the instructions are Valid as of Version 6.3.5 as well
Last edit: 5 months 1 week ago by marcgold. Reason: Updates to include V6 Stream
The following user(s) said Thank You: tpartner, paulfiner
Please Log in to join the conversation.