View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05524 | Bug reports | Survey taking | public | 2011-10-21 11:26 | 2012-03-14 21:08 |
Reporter | halliballi123 | Assigned To | TMSWhite | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.91+ | ||||
Target Version | 1.92RC5 | Fixed in Version | 1.92RC5 | ||
Summary | 05524: matrix (text) + additionl option only numbers not working correct | ||||
Description | When using question type "matrix (text)" and checking option "only numbers" in the extended options the input of the data does not work correctly. | ||||
Steps To Reproduce | My Survey is in German and I have selected "," as decimal separator. First of all the decimal separator seems to be "." when I enter data using the regular keyboard. "," is not accepted. But when using the numbers block "," is accepted | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 11136 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox / Internet Explorer 8 | ||||
Database type & version | mySQL 5.1.56 | ||||
Server OS (if known) | gentoo Linux | ||||
Webserver software & version (if known) | Apache 20051115 | ||||
PHP Version | PHP Version 5.3.8-pl0-gentoo | ||||
This works fine in 1.92. If alternate values are needed you can use a preg filter on this question type. That won't prevent entry of invalid characters, but will set the background color of the field to red if it doesn't meet the validation criteria. |
|
1.92RC3 released |
|
I can not switch to a newer version right now, I have several surveys active at the moment. so I just have to ask. Does it now behave like it is meant to or do I have to add something additional to my question (like some kind of regex)? In my opinion it would be better if questions of similar kind would behave the same. It is not obvious for the user if the decimal seperator of "the normal" keyboard does not work but the one of the numbers block does. And if I choose a locale like e.g. German for the survey I think it would be great if all numbers fields would only accept numbers in the locale specific format. Otherwise it is not user friendly and easy to use. Thanks a lot for looking into this. And sorry for asking again. |
|
The core problem here is the use (in 1.91+ and beyond) of an onkeypress event to only allow numbers to be entered in the field. Perhaps we should move away from that and use regular expression validation whenever people select numbers only. Then we could have different regex for different countries, making it easier to use commas or spaces as thousands and/or decimal separators when needed. This would also allow us to support negative numbers, which currently don't work for many numbers-only entries. |
|
on second look, the core problem is with the multi_set() function. The onkeypress() function is allowing commas. Either way, however, you can still enter invalid numbers. Incorporating regex-based validation could fix that. |
|
You are right, it would be possible to use regex-validation for numbers. I am using short text question type combined with regex for numberformat with thousands seperator or negative numbers. But I have made the experience that survey participants don't really like that and they ususally prefer fields where they only can enter things that are allowed and they don't have to find the question on the page where something is missing and/or something is in an incorrect format. In the meantime I use inputmask for things like that. But I have not tried to use the code for matrix (text) instead of "only numbers" option |
|
Fixed with patch https://github.com/LimeSurvey/LimeSurvey/commit/d71ff2dce798a695614eff9cf807f98b2ae5dfdb |
|
Thank you, as soon as I will have time, I will test the patch |
|
Actually, it will be available in 1.92 RC5, which, with luck, will be released today. |
|
1.92RC5 release |
|
LimeSurvey: Yii 2f2d874f 2012-03-01 21:08 Details Diff |
Fixed issue 05524: matrix (text) + additionl option only numbers not working correct Dev This input type now supports comma as the radix separator Dev Made comparable to other numeric inputs - only does processing on change; and if an invalid number is detected, the field is immediately blanked Dev Note, in 1.91, also did not have checkconditions() bound when non-numeric; so fixed that too. |
Affected Issues 05524 |
|
mod - application/helpers/qanda_helper.php | Diff File | ||
mod - scripts/survey_runtime.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-10-21 11:26 | halliballi123 | New Issue | |
2011-10-21 11:26 | halliballi123 | File Added: _limesurvey_survey_99243.lss | |
2011-10-21 21:24 | c_schmitz | Assigned To | => c_schmitz |
2011-10-21 21:24 | c_schmitz | Status | new => assigned |
2011-11-07 18:49 | c_schmitz | Target Version | => 2.00a2 |
2011-11-07 18:49 | c_schmitz | Status | assigned => acknowledged |
2012-01-20 16:34 | TMSWhite | Note Added: 16867 | |
2012-01-20 16:34 | TMSWhite | Status | acknowledged => resolved |
2012-01-20 16:34 | TMSWhite | Resolution | open => fixed |
2012-01-24 21:38 | c_schmitz | Fixed in Version | => 1.92RC3 |
2012-01-30 18:41 | c_schmitz | Note Added: 17073 | |
2012-01-30 18:41 | c_schmitz | Status | resolved => closed |
2012-01-31 07:55 | halliballi123 | Note Added: 17099 | |
2012-01-31 07:55 | halliballi123 | Status | closed => feedback |
2012-01-31 07:55 | halliballi123 | Resolution | fixed => reopened |
2012-01-31 09:29 | c_schmitz | Assigned To | c_schmitz => TMSWhite |
2012-01-31 16:55 | TMSWhite | Note Added: 17104 | |
2012-02-01 06:54 | TMSWhite | Note Added: 17125 | |
2012-02-01 07:46 | halliballi123 | Note Added: 17126 | |
2012-02-01 07:46 | halliballi123 | Status | feedback => assigned |
2012-02-03 16:44 | c_schmitz | Assigned To | TMSWhite => gautamgupta |
2012-02-03 16:44 | c_schmitz | Fixed in Version | 1.92RC3 => |
2012-02-04 13:55 | gautamgupta | Assigned To | gautamgupta => |
2012-02-04 13:55 | gautamgupta | Assigned To | => TMSWhite |
2012-02-10 21:15 | TMSWhite | Relationship added | related to 05792 |
2012-02-24 00:11 | TMSWhite | Target Version | 2.00a2 => 1.92RC5 |
2012-02-24 10:45 | TMSWhite | Note Added: 17605 | |
2012-02-24 10:45 | TMSWhite | Status | assigned => resolved |
2012-02-24 10:45 | TMSWhite | Fixed in Version | => 1.92RC5 |
2012-02-24 10:45 | TMSWhite | Resolution | reopened => fixed |
2012-02-24 10:48 | halliballi123 | Note Added: 17606 | |
2012-02-24 10:57 | TMSWhite | Note Added: 17607 | |
2012-02-26 14:21 | c_schmitz | Note Added: 17642 | |
2012-02-26 14:21 | c_schmitz | Status | resolved => closed |
2012-03-09 17:29 | TMSWhite | Relationship added | related to 05490 |
2012-03-14 21:08 | TMSWhite | Changeset attached | => Import 2012-03-09 13:30:34 Yii 2f2d874f |