Welcome to the LimeSurvey Community Forum

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

Setting Default Values for Multiple Numerical Input Question

  • fwruta1996
  • fwruta1996's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 2 weeks ago #269354 by fwruta1996
LimeSurvey version: 6.0.2+230417
Survey theme/template: Vanilla
==================Hi everyone,I am using LimeSurvey version 6.0.2+230417 and I have a question regarding "multiple numerical input" questions. In my survey, I have a question (Q007) with sub-questions from SQ001 to SQ007, where the sum of the responses must be 100. I have correctly set the constraints to ensure that the sum is exactly 100.The problem I am encountering is that, having set the question as mandatory, the system requires me to fill in all the fields. However, if I enter 100 in just one sub-question, the condition of the sum is already satisfied. I would like to know if it is possible to set default values (such as zero) for these sub-questions, or to automatically fill in all fields with 0 if they are left blank, to avoid having to manually fill in all the fields.Has anyone faced a similar issue or have suggestions on how to resolve it?Thank you very much for your help!Best regards,

Francesco

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 2 weeks ago - 1 month 2 weeks ago #269355 by Joffm
Hi,
this is desired behaviour, not an issue.
"mandatory" means: all fields have to be filled.

But what do you want to achieve?
If you allow the respondents to leave blank some subquestions, set the question to "not mandatory".
Because the additional condition(s) "equal sum value: 100", maybe "minimum value: 0" (to avoid something like  150, -50) the respondent can't proceed unless the sum is equal 100.

And if you want to avoid blanks in your result (better, cleaner to analyze), you can set the empty fields to "0" in a following equation
{Q1_1=if(is_empty(Q1_1),0,Q1_1)}
{Q1_2=if(is_empty(Q1_2),0,Q1_2)}
...

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 2 weeks ago by Joffm.
The following user(s) said Thank You: fwruta1996

Please Log in to join the conversation.

  • fwruta1996
  • fwruta1996's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 2 weeks ago #269361 by fwruta1996
Thank you. I want the respondent to be required to answer the question: by setting it as non-mandatory, they will be free to leave the question blank, but I want them to answer to proceed with the questionnaire.

So, the two equations you provided ensure that the cells are set to 0 if left blank? Where should I insert this condition? If it's in the validation equation of the question, how can I write it for the different sub-questions in a single equation? Thank you!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 2 weeks ago #269366 by Joffm
Hi, Francesco
1.

by setting it as non-mandatory, they will be free to leave the question blank

No, the will not be free to leave the question blank
Because in the question settings you enter the condition (sum==100)
Did you see this?
 

But they are free to leave some cells blank
This is what you asked for.
The respondents are allowed to leave dields blank, so that they don't have to enter a lot of "0".

2.

So, the two equations you provided ensure that the cells are set to 0 if left blank?
Where should I insert this condition?

As I wrote

 in a following equation

question of type "equation"
And not only two. You see the three dots below?
This means you write this for each subquestion.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose