By drunkencelt on
Hi all,
Having problems getting CCK default values to transfer across so I'm trying to take it one step at a time before I start putting 'node type" and other variables in.
I just need to check that I understand this right. If I place the following code in the textfield default value PHP code box it should return the string 'test' to the field in edit content type form, correct?
return array(
0 => array('value' => 'test')
);This is this code in it's simplest form. So if this isn't working the problem isn't the code and must be elsewhere.
Just need some confirmation I'm not going mad here. :-)
Thanks
Comments
Depends, did you take the red pill or the blue pill?
As I understand it you need to enable PHP for that node to have PHP execute.
Secondly, I thought that default values were like "yes" or "no" or "red" or "blue". and that it comes from your allowed list of values that you specify for that field of a content type when you create the CCK field.