Closed (fixed)
Project:
References
Version:
7.x-2.x-dev
Component:
Code: node_reference
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2011 at 02:16 UTC
Updated:
11 Aug 2011 at 01:31 UTC
I am trying to stick a node_reference field type in my_field_widget_form hook for a custom field. This is what the definition looks like:
$element['link_options']['more_link_node'] = array(
'#type' => 'node_reference',
'#title' => t('Internal learn more link'),
'#required' => FALSE,
'#description' => t('Choose a page on this website.'),
'#default_value' => isset($items[$delta]['more_link_node']) ? $items[$delta]['more_link_node'] : NULL,
'#weight' => 50,
'#size' => 100,
'#required' => FALSE,
) + $base;
$element['more_link_ext'] = array(
'#type' => 'textfield',
'#title' => t('Learn more link'),
<snip/>
This doesn't seem to work. Should it? Is there some way to make it work?
Comments
Comment #1
yched commentedhttp://drupal.org/project/field_collection woudl be the way to go.