function computed_field_widget in Computed Field 6
Same name and namespace in other branches
- 5 computed_field.module \computed_field_widget()
Implementation of cck hook_widget()
File
- ./
computed_field.module, line 278
Code
function computed_field_widget(&$form, &$form_state, $field, $items, $delta = 0) {
$elements = array();
foreach ($items as $delta => $item) {
$elements[$delta]['value'] = array(
'#type' => 'value',
'#tree' => TRUE,
'#default_value' => isset($item['value']) ? $item['value'] : NULL,
);
}
return $elements;
}