Download & Extend

Use field "key" intead of "label" in node template

Project:Content Construction Kit (CCK)
Version:6.x-2.8
Component:optionwidgets.module
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Normally, when I need to access the value for a CCK field in a node template, I'll use something like $node->field_fieldname[0]['view']

For "Text" fields using the "Check boxes/radio-buttons" widget, this gives the field label. How can I get the field key instead?

I'm using the words key and label as used in the "Allowed Values" fieldset, e.g.

key1|label1
key2|label2
key3|label3
nobody click here