Investigate hook_nodeapi, specifically the insert and update operations,<br><br>Victor Kane<br><a href="http://awebfactory.com.ar">http://awebfactory.com.ar</a><br><a href="http://projectflowandtracker.com">http://projectflowandtracker.com</a><br>

<br><div class="gmail_quote">On Mon, Jun 22, 2009 at 1:50 PM, Brian Vuyk <span dir="ltr">&lt;<a href="mailto:brian@brianvuyk.com">brian@brianvuyk.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




  
  

<div bgcolor="#ffffff" text="#000000">
Is it something that could be done using a CCK Computed Field? It
allows the field to be populated using PHP, and had the contents of the
other fields available to it.<br>
<br>
Might be a little simpler than doing something in a module. Unless, of
course, you don&#39;t want it&#39;s function accessible from the frontend.<br>
<br>
Brian<div><div></div><div class="h5"><br>
<br>
On 06/22/2009 12:44 PM, David Hautbois wrote:
<blockquote type="cite">Hi
  <br>
I&#39;m developping a custom CCK field for Drupal 6.
  <br>
I&#39;m don&#39;t want the user set the value himself. So, this field has no
widget.
  <br>
  <br>
I&#39;m looking for how to set the value when the node is saved. (the value
is set when the node is created et not updated)
  <br>
In hook_field, I tried to use &#39;presave&#39; ou &#39;validate&#39; for $op, but I&#39;ve
some problems to work with it :
  <br>
- &#39;presave&#39; seems to be called when the node is displayed...
  <br>
- when the node is created, the field has no value ($items[0][&#39;value&#39;]
does not exists)
  <br>
- ...
  <br>
  <br>
I &#39;ve look in some others CCK fields, but no one work like this.
  <br>
  <br>
I copied the text_field CCK field, renamed all &#39;text_field&#39; references,
simplified it and removed the widget.
  <br>
  <br>
Can someone help me or point me to a good web page ? (not the CCK dev
documentation !, I read it many times!)
  <br>
  <br>
Thanks.
  <br>
  <br>
David
  <br>
</blockquote>
<br>
<br>
</div></div><font color="#888888"><div>-- <br>
<b>Brian Vuyk</b><br>
Web Design &amp; Development<br>
T: 613-534-2916<br>
Skype: brianvuyk<br>
<a href="mailto:brian@brianvuyk.com" target="_blank">brian@brianvuyk.com</a> | <a href="http://www.brianvuyk.com" target="_blank">http://www.brianvuyk.com</a>
</div>
</font></div>

</blockquote></div><br>