Acquia Drupal
PHP 5.1.x
Drupal 6.22 (I think)
CCK 6.x 3.x dev

I have a Multigroup with the following fields:

Course Name [text]
Credits [decimal]
Grade [decimal referenced with Select List Widget]
Computed field
AP? [checkbox]

The Grade field values are a select list widget wherein the value|label field has associations of 3.0|B , 3.25|b+ etc. Data type is decimal.

When creating the node, it seems to work fine (though I don't have the computed field working yet, there's no code in it).

I can enter values, save and on VIEW it _looks_ fine. All values are shown correctly.

If I go back to EDIT the node ... all values in the GRADE field are reset to -blank- values; since they are required, you have to re-enter all the values for only that field.

The CREDIT fields, that are typed in manually, are just fine... but the GRADE fields (list select widget) are all back to -blank- values.

* I did notice that the select value list is set to blank values for default, but I don't think the problem is that.

Ideas?

Thanks oodles.

Comments

one_hoopy_frood’s picture

Figured it out.

The decimal precision of the stored values was 2 places to the right of the decimal.

I stored the values in my list for GRADES as
4|A
3.75|A-
3.5|B (etc.)

On page refresh, I would think Drupal tries to match the stored data value with the set value list.

Node edit:
User selects B, value placed in field 3, Drupal stores 3.00.

NEXT node edit:
Drupal tries to display the label for value 3.00, but no value exists in list (list value is 3, not 3.00), so defaults to empty text.

Thus, having to set ALL grades at each node edit.

one_hoopy_frood’s picture

Status: Active » Closed (works as designed)