View Issue Details

IDProjectCategoryView StatusLast Update
15615Bug reportsSurvey takingpublic2020-07-30 09:14
ReporterMazi Assigned To 
Status confirmedResolutionopen 
Product Version3.20.x 
Summary15615: Mandatory multiple choice questions are not assigned a red background if not being answered

When not answering a mandatory array question and clicking next, the not answered question gets highligjted with a red border, see screenshots.
For multiple choice questions, this highlighting is missing, see screenshot. Only the default warning text is there.

Steps To Reproduce

Import the attached survey.
Click next at the first question page -> the array question gets a red border.
Answer the array question and click next.
At the following mukltiple choice question click next -> the default warning text appears but the red border is missing.

Additional Information

This seems to be a general issue since it shows up at fruity and vanilla template.

The multiple choice question is missing CSS class "input-error" which gets assigned to not answered mandatory questions and comes with the CSS for the red border.

TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 3.20
I will donate to the project if issue is resolvedNo
Database & DB-VersionMySQL 5
Server OS (if known)Ubuntu 18
Webserver software & version (if known)Apache 2
PHP Version7.2




2019-11-23 16:54

partner   ~54770

@cdorin, this was reported by a customer who would be happy about a quick fix for the next release. Shouldn't be too trickyy to fix.



2020-07-29 17:16

manager   ~59159

Deleted the SS and .lss file - ticket now public. Thx for report, Mazi



2020-07-29 21:35

developer   ~59164

Last edited: 2020-07-29 21:36

View 2 revisions

I see 2 problems here.

1) This is general, not ony for checkboxes.
If a certain question has a specific validation and also is mandatory, the shade will not appear.
This is because the shade related to the "mandatory" validation is cleared by the other valdation being satisfied.

2) This is not only for mandatory validation.
If a question has 2 validations. The shade will only appear if the last one is the one failing.


  • Review JS for shade. It is triggered now on an event for a tip. Should be triggered at the end, after all validations are done. That should solve problem #2.

  • Still, it will not solve problem #1.

    • Shade show/hide is recalculated at client side.
    • Mandatory validation is recalculated at server side.
    • As to solve that, we should implement mandatory validation on client side.

Comments? @DenisChenu @ollehar



2020-07-30 09:13

developer   ~59191

My own opinion :

  1. I don't like the core system with same css class after and before submit … in 2.6 input-error are set ONLY when try to submit. In SkelVanilla : i use same system
  2. mandatory are not checked with javascript, then input-error are not removed when answer is done see inputerror-butOK picture
  3. You can't really compare mandatory in array and mandatory in multiple : we have a count(self) > 0 and count(self) == number of subquestion (see lss)

Then : my opinion

  1. Remove the input-error update by JS. It's awfull to have it when came at a page for the 1st time for user.
  2. The js update have other issue whe you disable hide-tip
  3. Move mandatory to Expression Manager systyem : then have it like the other validation (tip-mandatory etc ) : this one is a bigger step (and maybe for 5.X)

Yes moving mandatory to expression manager is a great thing to do BUT : it's not a little fix ;)

inputerror-butOK.png (44,904 bytes)   
inputerror-butOK.png (44,904 bytes)   


2020-07-30 09:14

developer   ~59192

Some other picture
The 1st one confirm the shade difference :)

Issue History

Date Modified Username Field Change
2019-11-23 16:54 Mazi New Issue
2019-11-23 16:54 Mazi File Added: limesurvey_survey_417165.lss
2019-11-23 16:54 Mazi Note Added: 54770
2019-11-23 16:59 Mazi File Added: MC_mandatory.png
2019-11-23 16:59 Mazi File Added: array_madatory.png
2019-11-26 17:36 cdorin Assigned To => cdorin
2019-11-26 17:36 cdorin Status new => assigned
2020-07-10 00:31 cdorin Priority none => low
2020-07-10 00:31 cdorin Status assigned => confirmed
2020-07-10 00:31 cdorin Description Updated View Revisions
2020-07-10 00:31 cdorin Steps to Reproduce Updated View Revisions
2020-07-10 00:31 cdorin Additional Information Updated View Revisions
2020-07-10 00:31 cdorin Assigned To cdorin =>
2020-07-29 17:15 cdorin File Deleted: limesurvey_survey_417165.lss
2020-07-29 17:15 cdorin File Deleted: MC_mandatory.png
2020-07-29 17:15 cdorin File Deleted: array_madatory.png
2020-07-29 17:16 cdorin View Status private => public
2020-07-29 17:16 cdorin Note Added: 59159
2020-07-29 21:35 gabrieljenik Note Added: 59164
2020-07-29 21:36 gabrieljenik Note Edited: 59164 View Revisions
2020-07-30 09:13 DenisChenu Note Added: 59191
2020-07-30 09:13 DenisChenu File Added: inputerror-butOK.png
2020-07-30 09:13 DenisChenu File Added: limesurvey_survey_912299.lss
2020-07-30 09:14 DenisChenu Note Added: 59192
2020-07-30 09:14 DenisChenu File Added: Capture d’écran du 2020-07-30 09-06-25.png
2020-07-30 09:14 DenisChenu File Added: Capture d’écran du 2020-07-30 09-06-39.png