Posted by matslats on May 12, 2008 at 5:38pm
I have a CCK contentType who's fields don't correspond to the node/add form elements, so I want to put some code between the form submission and the the db INSERT.
This hack using hook_nodeapi doesn't work because $form isn't passed to nodeAPI, and CCK seems to insert the node regardless of, or before anything that happens through nodeAPI.
Having manipulated the form data, I also want a confirmation page. I already wrote a module to define the contentType, but stalled when I realised that my fields were not exposed to views.
Thanks for any helpful comments.

Comments
hook_nodeapi() is the right method.
Actually all of your posted forms are put into $node object.
The hook_nodeapi() is not a hack and is actually the same method which CCK uses to add additional fields to the node form.
Gordon Heydon
Lead Drupal Developer - Lonely Planet
--
Gordon Heydon
so which hook?
Thanks Gordon,
I've had another look and maybe the presave operation will do it. Do you know how I might bring up a confirmation page afer the presave and before the insert?
Pushing my luck?
Matthew