Helo, I've built a simple cck module for storing attributes with a node, it consists of two fields Key and Value. Unfortunately when I come to edit a node, the existing entered values don't show up and I'm not sure why. My understanding is that in the attributes_widget function the "prepare form values" paramater should be passed and any edit processing should be done here.

Since more or less I'm just editing raw text I don't need to do any processing so I am ignoring this call, is that correct?

I put a debug print_r() in at that point and got the following output

Array ( [0] => Array ( [thekey] => Coke [thevalue] => VND13,000 ) [1] => Array ( [thekey] => Beer [thevalue] => VND20,000 ) )

Which would seem right to me, however how do I get these values to appear in the form edit fields?

Hope you can help.

Comments

dageshi’s picture

Ahh o.k I figured it out :)

Those values are set in the "form" block.