function userreference_widget_settings in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 5 userreference.module \userreference_widget_settings()
- 6.3 modules/userreference/userreference.module \userreference_widget_settings()
- 6.2 modules/userreference/userreference.module \userreference_widget_settings()
Implementation of hook_widget_settings().
File
- modules/
userreference/ userreference.module, line 246 - Defines a field type for referencing a user from a node.
Code
function userreference_widget_settings($op, $field) {
switch ($op) {
case 'form':
$form = array();
$form['reverse_link'] = array(
'#type' => 'radios',
'#title' => t('Reverse link'),
'#default_value' => isset($field['reverse_link']) ? $field['reverse_link'] : 0,
'#options' => array(
0 => t('No'),
1 => t('Yes'),
),
'#required' => TRUE,
'#description' => t('If selected, a reverse link back to the referencing node will displayed on the referenced user record.'),
);
return $form;
break;
case 'save':
return array(
'reverse_link',
);
break;
}
}