Hello,

I'm trying to create a CCK compound field with a file upload. I'm able to get the default file upload to show on the widget with:

	$element['corevideofield']['files']['new'] = array(
		'#type' => 'file',
		'#title' => t('or upload a new video'),
		'#default_value' => array(),
	);

But if I change the #type to 'filefield' I get no output at all. I assume I'm missing something, if you could point me in the right direction it would be greatly appreciated.

[edit]
I've found I can make the field appear by using:

     $elements['corevideofile']['files']['new'] = filefield_elements();

but there's a few php warnings and it's non functional. I'm not sure if I'm getting closer or if this is a red herring...

Comments

quicksketch’s picture

Status: Active » Closed (won't fix)

I'm not sure if this is even possible, though there have been quite a few attempts at something like this in CCK Multifields and CCK 3.0. In any case, support for the D6 module is pretty much at an end. I don't have any D6 sites any more and won't be attempting to figure this out. From the looks of things there aren't any other responses either, so I'm closing this issue.

quicksketch’s picture

Issue summary: View changes

Updated with additional results