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

yched’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.