function computed_field_widget in Computed Field 5
Same name and namespace in other branches
- 6 computed_field.module \computed_field_widget()
Implementation of cck hook_widget()
File
- ./
computed_field.module, line 199
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;
}