OK, worked it out. I had to do a node_load() first, thought node_view took an nid, but it takes a full node object. Assigning the output of node_view to $form['prefix'] achieves the result I want. Thanks, Anthony. On 15/04/2010 3:28 PM, Anth wrote:
Hi,
I asked this on the support list, but maybe it's more appropriate on the dev list. I've tried to load the view using node_view (the idea being I'd put the resulting html snippet in something like #description or define a field for it to display) but CCK is complaining with the error below. Working through it now, but wondering if anyone has any better ideas to achieve what I want?
warning: Invalid argument supplied for foreach() in E:\websites\timesheet\sites\all\modules\cck\content.module on line 1284.
I was wondering if there was an easy way to get the view and edit details onto the one tab? I have a content type created with CCK and I'm using CCK content permissions to set field level permissions on the fields so that role_1 can enter data and role_2 can view the data and then approve/decline it using another CCK field that role_1 cannot see or edit. The problem I have is that when the user of role_2 looks at the node the view fields are on the view tab and the approve field is all on its own on the edit tab. I would like to have both on the same screen so that role_2 can see what they're approving without having to navigate between the two tabs. Any ideas on doing this in an elegant way?
Regards, Anthony.