You are here

function userreference_user_from_userref_settings_form in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 modules/userreference/panels/relationships/user_from_userref.inc \userreference_user_from_userref_settings_form()

Settings form for the ctools relationship.

1 string reference to 'userreference_user_from_userref_settings_form'
userreference_user_from_userref_ctools_relationships in modules/userreference/panels/relationships/user_from_userref.inc
Implementation of hook_ctools_relationships().

File

modules/userreference/panels/relationships/user_from_userref.inc, line 47
Implements the user reference relationship for Panels.

Code

function userreference_user_from_userref_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' => isset($conf['field_name']) ? $conf['field_name'] : '',
    '#prefix' => '<div class="clear-block">',
    '#suffix' => '</div>',
  );
  return $form;
}