Drupal 6 & CCK field filling manually
Posted In:
CCK field filling
,
drupal
.
By ziDev
If you should fill CCK field manually you must fill 'value' field and '_error_element' field. Otherwise data will not be accepted.
/**
* Implementation of hook_nodeapi().
*/
function custom_nodeapi(&$node, $op) {
switch ($op) {
case 'presave':
if ($node->type == 'order') {
$node->field_date_creation[0]['value'] = format_date(time());
$node->field_date_creation[0]['_error_element'] = 'field_date_creation][0][value';
}
break;
}
}

0 Responses to Drupal 6 & CCK field filling manually
Something to say?