--- flexinode.module.orig 2006-04-12 20:02:56.000000000 +0300 +++ flexinode.module 2006-04-29 15:34:08.000000000 +0300 @@ -603,6 +603,9 @@ $ctype = flexinode_load_content_type($node->ctype_id); foreach ($ctype->fields as $field) { $fieldname = 'flexinode_'. $field->field_id; + if ($result = flexinode_invoke('execute', $field, $node)) { + $node->$fieldname = $result; + } $validation = flexinode_invoke('validate', $field, $node); if ($field->required && !$node->$fieldname) { form_set_error($fieldname, t('You must fill in the field "'. $field->label .'".')); @@ -615,17 +618,8 @@ * Implementation of hook_submit(). */ function flexinode_submit(&$node) { - if (isset($node->ctype_id)) { - $ctype = flexinode_load_content_type($node->ctype_id); - foreach ($ctype->fields as $field) { - if ($result = flexinode_invoke('execute', $field, $node)) { - $fieldname = 'flexinode_'. $field->field_id; - $node->$fieldname = $result; - } - } - // Pre-render the body and teaser fields, so the Drupal search works. - $node = flexinode_content($node); - } + // Pre-render the body and teaser fields, so the Drupal search works. + $node = flexinode_content($node); } /**