Can someone give me the exact code to insert programmatically a emfield value for a video.
Here is my actual portion of code for insert the emfield:
$node->field_emfield[LANGUAGE_NONE][] = array(
'fid' => $file->fid,
'display' => 1,
'description' => '',
);
It miss some information but I don't know what.
Thanks
Comments
Comment #1
nevets commentedDon't know the answer but to solve it I would temporary implement hook_node_insert() with this as the body of the function.
Then create a node of the appropriate type (one with a media field), populate the media field, save and look at the node dump.