<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Verdana size=2><SPAN class=687493422-06012006>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:</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN 
class=687493422-06012006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2><SPAN class=687493422-06012006>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. :)</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN 
class=687493422-06012006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2><SPAN class=687493422-06012006>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.</SPAN></FONT></DIV>
<DIV><FONT face=Verdana size=2><SPAN 
class=687493422-06012006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2><SPAN 
class=687493422-06012006>--Jeff</SPAN></FONT></DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Earl Dunovant 
  [mailto:prometheus6@gmail.com] <BR><B>Sent:</B> Friday, January 06, 2006 4:31 
  PM<BR><B>To:</B> development@drupal.org<BR><B>Subject:</B> Re: [development] 
  update hooks/APIs documentation<BR><BR></FONT></DIV>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.<BR><BR>It's weird...I had less problems with the bulk 
  import form.</BLOCKQUOTE></BODY></HTML>