custom item - html text input being saved without commas
custom item - html text input being saved without commas
I've created an html custom item, and when medialab intercepts the POST, it correctly populates the backing variable EXCEPT it omits the commas contained in the text.
i.e.
if the value of the variable in html is
'hello, you have access to items 1,2,3 and 4'
then the value saved in the data files is
'hello you have access to items 1 2 3 and 4'
Is this normal? Is there a way to change this?
It is normal and by design--mainly because certain non-alpha/numeric characters were interfering with data being read properly (e.g., in the case of comma-delimited text data). Maybe we could make it an option--is there a reason the commas, e.g., would be useful for you to have?
For my experiment, I swapped out the commas for semicolons as it was just a matter of syntactic convenience. I could imagine that if you were taking a writing sample or something, however, that they might be important. I did some poking around, and it seems that putting quotes around a field in a csv effectively escapes any commas contained therein. Has your experience been different?
Your poking has turned up wise and usually true information. Despite that, we still ran into to trouble for reasons unknown and so just decided to do away with them--weighing the benefits of predictable data structure with the costs of missing punctuation.
Maybe we could make it an option--is there a reason the commas, e.g., would be useful for you to have?
In many countries commas are used as decimal separator. In this case it is really a bad idea to just delete the comma, as it can be crucial to understand what the participant meant.
For example: How much money (in Euros) would you spend for item X?
Participant A: "15" saved as 15
Participant B: "1,50" saved as 150
I will copy this to the suggestions area so we can allow for this to be an option in the next version.