Closed (fixed)
Project:
Field Tool
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 Jun 2010 at 04:51 UTC
Updated:
21 Sep 2010 at 04:40 UTC
Jump to comment: Most recent file
So say you have allowed values of:
array(
1 => 'one',
2 => 'two',
3 => 'three',
)fieldtool_set($fields['field_number'], $node, 'three') won't work as it should.
Comments
Comment #1
Matthew Davidson commentedActually, above that should be fieldtool_import() rather than fieldtool_set().
Accordingly, this patch adjusts fieldtool_field_generic_value_itemize() to translate a value matching an allowed value label to it's corresponding key. Only attempts this on CCK field types, and silently fails, passing on the input value as received. Validation (as always) is left to Node API or Form API.
Comment #2
Matthew Davidson commentedOkay, stupid. Created the patch from the wrong version. For the record, here's the patch against HEAD.
Comment #3
Matthew Davidson commentedBrain-dead bugfix.