I created a new cck field with the following parameters:
fieldtype: number_integer (its the same with fieldtype text)
widgettype: select list
allowed value list
1|0
2|1
3|½
4|+
5|-
The first two lines are shown as "1" and "2" instead of "0" and "1" (in select list and node)
so I think the Key is shown instead the label
Is it possible to use 0 and 1 as a label ?
I need it to display results of chess tournaments
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 281749.patch | 798 bytes | asimmonds |
Comments
Comment #1
Micha1111 commentedNo solution ?
Comment #2
asimmonds commentedTaking the example allowed values list above, produces a $options array of:
notice that for the first pair, the key is used for the label instead of the requested "0", it should be:
When the allowed values list is parsed, the "0" value is being ignored because a (bool) test of "0" is false
The attached patch adds a isset() and a test for a empty string (in-case a allowed values line reads something like "2|" instead of "2|1")
Comment #3
yched commentedCommitted to D5 and D6 branches. Thanks !
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.