You are here

function userreference_user_from_userref_context_settings_form in Content Construction Kit (CCK) 5

Settings form for the panels relationship.

File

./userreference.module, line 478
Defines a field type for referencing a user from a node.

Code

function userreference_user_from_userref_context_settings_form($conf) {
  $options = array();
  foreach (content_fields() as $field) {
    if ($field['type'] == 'userreference') {
      $options[$field['field_name']] = t($field['widget']['label']);
    }
  }
  $form['field_name'] = array(
    '#title' => t('User reference field'),
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $conf['field_name'],
    '#prefix' => '<div class="clear-block">',
    '#suffix' => '</div>',
  );
  return $form;
}