Closed (fixed)
Project:
Prepopulate
Version:
6.x-1.1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2009 at 13:42 UTC
Updated:
1 Jun 2012 at 08:14 UTC
Greetings!
Using prepopulate, how do I add a value to a node reference field?
i can't figure it out, have read the book pages regarding the module, but still no result.
/node/add/forum?edit[field_forum_node][0][nid]=11
/node/add/forum?edit[field_forum_node][0][nid][nid]=11
/node/add/forum?edit[field_forum_node][0][nid][nid]=[nid:11]
The field html looks like this:
<input type="text" name="field_forum_node[0][nid][nid]" id="edit-field-forum-node-0-nid-nid" size="60" value="" class="form-text form-autocomplete text" />
Id be grateful for all hints & help!
Comments
Comment #1
farald commentedOh, it seems that you have to add the group the field resides in (if any), like this:
/node/add/forum?edit[group_name][field_forum_node][0][nid]=11Comment #3
kenorb commentedThanks.
Comment #4
doublejosh commentedThis does not work is the node reference is a select list.
You'll need:
edit[group_mygroup][field_myfield][nid][nid]=####