Active
Project:
Embedded Media Field
Version:
7.x-1.0-alpha2
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 May 2013 at 03:26 UTC
Updated:
15 May 2013 at 03:32 UTC
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.