CCK or custom module?

Events happening in the community are now at Drupal community events on www.drupal.org.
matslats's picture

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.

gordon's picture

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?

matslats's picture

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

Content Construction Kit (CCK)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week