View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
09369 | Bug reports | Survey taking | public | 2014-11-21 16:46 | 2014-12-10 09:21 |
Reporter | McRoa | Assigned To | DenisChenu | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.05+ | ||||
Fixed in Version | 2.05+ | ||||
Summary | 09369: Mandatory type N fields are validated upon first display | ||||
Description | Mondatory fields of type N (numeric) are prematurely validated upon their first display - no 'previous' or 'next' form submit - resulting in an error message stating the field should only contain numbers. Browsing a grouped survey has the same result. See attached test survey. | ||||
Steps To Reproduce | Add a type N field to any survey and make it mandatory. No default value or any other special settings. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 141113 | ||||
I will donate to the project if issue is resolved | Yes | ||||
Browser | Any | ||||
Database type & version | MySQL 5.5.40 | ||||
Server OS (if known) | Linux (CentOS) | ||||
Webserver software & version (if known) | Apache 2.4.10 | ||||
PHP Version | PHP 5.4.33 | ||||
No input-error added in question class. The error is not "mandatory numeric question is validated', the error is 'mandatory text question is not validated'. I think it's a no fix needed. |
|
Hi Denis, Thanks for your reply. If you run the test survey don't you think it's strange that the numeric fields generate an error message and the text fields do not? Both are empty upon first display, both are mandatory and yet only the numeric fields complain about being empty. IMHO someone taking a survey should at least have one chance to fill any field before validation messages should appear ... Regards! |
|
There are some template issue here. With citronade, and set hide tip to no : you don't see the error before click next. And if you set the second question : not mandatory and minimum value to 2 : you see the same behaviour than mandatory :). You have the near same behaviour with:
I can fix it easily, but not sure we want to fix it. I think i move mandatory to EM for 2.06, maybe .... PS: http://limesurvey.sondages.pro/survey/index/sid/275598/newtest/Y/lang/en you "don't" see the error at the first group. |
|
In fact : it's smae than short text with numeric only system. Thisone show error since a long long time .... |
|
Okay, thanks for your time Denis. I think I dig into the template (a custom variant of 'default') code and styles to see if I can find a workaround. |
|
Hi, For the template you have: .em_other_comment_mandatory : comment other mandatory But still, not sure what to do. Maybe : all tip accept empty + em_mandatory tip more for all :). Then i think we can validate the page before accept submit. Denis |
|
Hi Denis, Thanks again for your effort! With some searching in and tweaking of the styles I succeeded in achieving my goal: no more messages or red input backgrounds when a page with mandatory fields is shown for the first time. I think it would be a great idea to put all validation logic in one place as it's quite complex and diverted now. As far as I've seen LS is not using AJAX-calls at the moment, IMHO this is a neat way to accomplish validation before submitting a form. Although stricktly spoken the problem is not solved with my workaround, I will make a modest donation to the project, because I value LS and I think open source software in general should be supported ;-) Regards! |
|
Fix committed to 2.06 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14714 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14715 |
|
Same behaviour for mandatory question and non mandatory question |
|
@McRoa : actually a lot of validation except mandatory is done in javascript. No need ajax. |
|
Version 2.05+ Build 141210 released |
|
LimeSurvey: 2.06 759a5e54 2014-12-09 15:33 Details Diff |
Fixed issue 09369: Mandatory type N fields are validated upon first submit Dev : leave mandatory for mandatory in other question too |
Affected Issues 09369 |
|
mod - application/helpers/expressions/em_manager_helper.php | Diff File | ||
LimeSurvey: master 89b1847d 2014-12-09 15:39 Details Diff |
Fixed issue 09369: Mandatory type N fields are validated upon first submit Dev : leave mandatory for mandatory in other question too |
Affected Issues 09369 |
|
mod - application/helpers/expressions/em_manager_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-11-21 16:46 | McRoa | New Issue | |
2014-11-21 16:46 | McRoa | File Added: limesurvey_survey_275598.lss | |
2014-11-21 17:14 | c_schmitz | Assigned To | => DenisChenu |
2014-11-21 17:14 | c_schmitz | Status | new => assigned |
2014-11-21 18:00 | DenisChenu | Note Added: 31022 | |
2014-11-21 18:01 | DenisChenu | Note Edited: 31022 | |
2014-11-21 18:09 | McRoa | Note Added: 31024 | |
2014-11-21 18:10 | McRoa | Note Edited: 31024 | |
2014-11-21 18:22 | DenisChenu | Note Added: 31025 | |
2014-11-21 18:23 | DenisChenu | Note Edited: 31025 | |
2014-11-21 18:27 | DenisChenu | Note Added: 31026 | |
2014-11-21 22:04 | McRoa | Note Added: 31033 | |
2014-11-21 22:58 | c_schmitz | Summary | Mondatory type N fields are validated upon first display => Mandatory type N fields are validated upon first display |
2014-11-22 14:40 | DenisChenu | Note Added: 31038 | |
2014-11-22 20:56 | McRoa | Note Added: 31053 | |
2014-11-22 20:57 | McRoa | Note Edited: 31053 | |
2014-12-09 15:33 | DenisChenu | Changeset attached | => LimeSurvey 2.06 759a5e54 |
2014-12-09 15:33 | DenisChenu | Note Added: 31216 | |
2014-12-09 15:33 | DenisChenu | Resolution | open => fixed |
2014-12-09 15:39 | DenisChenu | Changeset attached | => LimeSurvey master 89b1847d |
2014-12-09 15:39 | DenisChenu | Note Added: 31217 | |
2014-12-09 15:40 | DenisChenu | Note Added: 31218 | |
2014-12-09 15:40 | DenisChenu | Status | assigned => resolved |
2014-12-09 15:40 | DenisChenu | Fixed in Version | => 2.05+ |
2014-12-09 15:41 | DenisChenu | Note Added: 31219 | |
2014-12-10 09:21 | c_schmitz | Note Added: 31224 | |
2014-12-10 09:21 | c_schmitz | Status | resolved => closed |