View Issue Details

This issue affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
20818Bug reportsQuestion editorpublic2026-11-04 23:09
Reporterc_schmitz Assigned To 
PrioritynormalSeveritypartial_block 
Status newResolutionopen 
Summary20818: Mandatory means different things per question type and can conflict with the minimum/maximum answers settings
Description

This has been confusing survey authors for years. Since 2019 the same kind of report keeps coming back: a mandatory question can't be completed, or the minimum/maximum answers setting seems to be ignored (15363 in 2019, 17330 in 2021, 20622 in 2026). Each time only the reported case was patched, and only for ranking. The underlying inconsistency was never addressed, so every other question type with more than one answer still has the same problem.

The "Mandatory" setting is one On/Soft/Off switch, but what it requires depends on the question type, and the question editor doesn't show which rule applies:

  • Single-answer types (list, text, numerical, date, ...): an answer must be given.
  • Multiple choice (with and without comments): at least one option must be checked.
  • All array types, multiple short text, multiple numerical: every row must be answered.
  • Array (Numbers) with checkbox layout: at least one box per row.
  • Ranking: all items must be ranked, unless a minimum or maximum number of answers is set. Then one ranked item is enough.

The "Minimum answers" and "Maximum answers" settings work separately from mandatory, which causes three problems:

  1. Questions that can't be completed. If a mandatory array, multiple short text or multiple numerical question has a maximum number of answers below its number of rows, it can never be completed. Mandatory requires all rows, and the maximum allows fewer. Ranking had the same problem (15363, 17330); it was fixed with a special case for ranking only.
  2. A minimum that has no effect. On a mandatory array, "Minimum answers = 3" does nothing, because all rows are required anyway.
  3. A hidden mandatory. A question that isn't mandatory but has a minimum number of answers can't be left empty. The sum settings of multiple numerical behave differently: they only apply once the question has been answered.
Additional Information

How to finally fix it

Another special case for one more question type would only move the confusion elsewhere. We should fix the model itself, once, for all question types with more than one answer field: the question editor should say exactly what "mandatory" requires, and the settings should not be able to contradict each other.

Keep the Mandatory switch. For question types with more than one answer field, add a "Required answers" setting next to it:

  • All items: default for arrays, multiple short text, multiple numerical and ranking
  • At least one: default for multiple choice
  • Between [min] and [max]: replaces the separate minimum/maximum answers settings

Mandatory decides whether the question has to be answered at all. "Required answers" decides how much of it. On a question that isn't mandatory, the range only applies once the participant has answered something.

Results:

  • Contradictory combinations like "all items" with "at most 2" can no longer be set up.
  • Admins can see what mandatory means for each question type.
  • The database update gives existing questions the option that matches how they behave today. Questions with a minimum or maximum get "Between". Questions that aren't mandatory but have a minimum become mandatory, which is what they already do in practice. Existing surveys keep working the same way.

Until this is in place, the question editor should at least warn when a contradictory combination is configured, so authors stop running into it unnoticed.

TagsNo tags attached.
Bug heat0
Complete LimeSurvey version number (& build)7.9.1 (master)
I will donate to the project if issue is resolvedNo
Browser-
Database type & version-
Server OS (if known)-
Webserver software & version (if known)-
PHP Version-
Git branch / Pull Request URL

Relationships

related to 15363 closedc_schmitz Can't submit question if ranking question uses both min/max and mandatory 

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-11-04 23:06 c_schmitz New Issue
2026-11-04 23:06 c_schmitz Relationship added related to 15363
2026-11-04 23:09 c_schmitz Description Updated
2026-11-04 23:09 c_schmitz Additional Information Updated