[development] update hooks/APIs documentation

Jeff Eaton jeff at viapositiva.net
Fri Jan 6 22:38:53 UTC 2006


I noticed that a lot of the heavy lifting for the moduel is done in
validate, including the actual population of the node object with the
amazon item information. The only thing I can think of off the top of my
head is to:
 
Retrieve the amazon data from scratch whenever a preview is built, based
on the known ASIN value. use the 'Validate' hook to establish whether
the asin(s) are valid but do NOT save, then retrieve the amazon data
again and actually save it on submit. It would entail more round-trips
to amazon, but it would work cleanly unless I'm missing something.
Anyone? Thoughts? Corrections? Maybe you're already past that point and
I'm just echoing. :)
 
Validate did a LOT of heavy lifting in the old forms system, and that's
been reduced with the new api. It requires reworking some steps in more
complicated modules.
 
--Jeff

-----Original Message-----
From: Earl Dunovant [mailto:prometheus6 at gmail.com] 
Sent: Friday, January 06, 2006 4:31 PM
To: development at drupal.org
Subject: Re: [development] update hooks/APIs documentation


My current task is figuring out how to properly do the preview when the
form is built BEFORE validation or or submit hooks are invoked and
neither hook has access to the node object, nor do the node validation,
insert and update hooks have access to the form object. And this is my
first look at image.module, which is suggested as an example.

It's weird...I had less problems with the bulk import form.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060106/a8f4104a/attachment.htm


More information about the development mailing list