View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
05524Bug reportsSurvey takingpublic2012-03-14 21:08
Reporterhalliballi123 Assigned ToTMSWhite  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.91+ 
Target Version1.92RC5Fixed in Version1.92RC5 
Summary05524: 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.
In Question type "only numbers" or "matrix (numbers)" this works as designed. But when the configuration is like above it does not work.

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

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)11136
I will donate to the project if issue is resolvedNo
BrowserFirefox / Internet Explorer 8
Database type & versionmySQL 5.1.56
Server OS (if known)gentoo Linux
Webserver software & version (if known)Apache 20051115
PHP VersionPHP Version 5.3.8-pl0-gentoo

Relationships

related to 05792 closedTMSWhite Problem with comma separator for EM_validation 
related to 05490 closedmdekker Spss export error in decimal values 

Users monitoring this issue

There are no users monitoring this issue.

Activities

TMSWhite

TMSWhite

2012-01-20 16:34

reporter   ~16867

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.

c_schmitz

c_schmitz

2012-01-30 18:41

administrator   ~17073

1.92RC3 released

halliballi123

halliballi123

2012-01-31 07:55

reporter   ~17099

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.
Regards

TMSWhite

TMSWhite

2012-01-31 16:55

reporter   ~17104

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.

TMSWhite

TMSWhite

2012-02-01 06:54

reporter   ~17125

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.

halliballi123

halliballi123

2012-02-01 07:46

reporter   ~17126

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.
http://www.limesurvey.org/de/forum/can-i-do-this-with-limesurvey/66996-postitive-list-of-chars-for-answers

But I have not tried to use the code for matrix (text) instead of "only numbers" option

TMSWhite

TMSWhite

2012-02-24 10:45

reporter   ~17605

Fixed with patch https://github.com/LimeSurvey/LimeSurvey/commit/d71ff2dce798a695614eff9cf807f98b2ae5dfdb

halliballi123

halliballi123

2012-02-24 10:48

reporter   ~17606

Thank you, as soon as I will have time, I will test the patch

TMSWhite

TMSWhite

2012-02-24 10:57

reporter   ~17607

Actually, it will be available in 1.92 RC5, which, with luck, will be released today.

c_schmitz

c_schmitz

2012-02-26 14:21

administrator   ~17642

1.92RC5 release

Related Changesets

LimeSurvey: Yii 2f2d874f

2012-03-01 21:08

TMSWhite


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

Issue History

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