<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body 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't want it's function accessible from the frontend.<br>
<br>
Brian<br>
<br>
On 06/22/2009 12:44 PM, David Hautbois wrote:
<blockquote cite="mid:4A3FB504.3010809@free.fr" type="cite">Hi
  <br>
I'm developping a custom CCK field for Drupal 6.
  <br>
I'm don't want the user set the value himself. So, this field has no
widget.
  <br>
  <br>
I'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 'presave' ou 'validate' for $op, but I've
some problems to work with it :
  <br>
- 'presave' seems to be called when the node is displayed...
  <br>
- when the node is created, the field has no value ($items[0]['value']
does not exists)
  <br>
- ...
  <br>
  <br>
I 've look in some others CCK fields, but no one work like this.
  <br>
  <br>
I copied the text_field CCK field, renamed all 'text_field' 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 class="moz-signature">-- <br>
<strong>Brian Vuyk</strong><br>
Web Design &amp; Development<br>
T: 613-534-2916<br>
Skype: brianvuyk<br>
<a class="moz-txt-link-abbreviated" href="mailto:brian@brianvuyk.com">brian@brianvuyk.com</a> | <a href="http://www.brianvuyk.com">http://www.brianvuyk.com</a>
</div>
</body>
</html>