Actions

QS

Min answers: Difference between revisions

From LimeSurvey Manual

mNo edit summary
mNo edit summary
Line 15: Line 15:
'''Valid values'''
'''Valid values'''


<!--T:435-->
<!--T:436-->
*Any integer value above 0
*Any integer value above 0
<!--T:436-->
*Any number
*Any number
*Any [[SGQA_identifier|SGQA]] code
*Any [[SGQA_identifier|SGQA]] code
Line 28: Line 26:


<!--T:433-->
<!--T:433-->
If set to X (a random number), the user will only be able to submit the survey form if they have selected at least three check-boxes. In ranking questions, this ensures that at least three items are ranked. '''Please note that if you use this attribute with Ranking questions, you have to set the question to non-mandatory. Otherwise, all the items need to be ranked which is counter-intuitive if you decide to use the min_answers function too.'''
If set to X (a random number), the users will only be able to submit the survey form if they have selected at least X checkboxes. In ranking questions, this ensures that at least three items are ranked.  
 
<div class="simplebox">[[File:help.png]] Please note that if you use this attribute with Ranking questions, you have to set the question to '''non-mandatory'''. Otherwise, all the items need to be ranked which is counter-intuitive if you decide to use the '''min_answers''' function too.</div>
 
</onlyinclude>
</onlyinclude>



Revision as of 17:37, 7 March 2018


Minimum answers (min_answers)

Description

This function can be used to ensure that a user selects at least a certain number of answers in a multiple choice question.

Valid values

  • Any integer value above 0
  • Any number
  • Any SGQA code
  • Any question code (variable name)
  • Any equation, using Expression Manager syntax, without surrounding curly braces.

Example

If set to X (a random number), the users will only be able to submit the survey form if they have selected at least X checkboxes. In ranking questions, this ensures that at least three items are ranked.

Please note that if you use this attribute with Ranking questions, you have to set the question to non-mandatory. Otherwise, all the items need to be ranked which is counter-intuitive if you decide to use the min_answers function too.