Posted by mattyb on March 10, 2008 at 2:04pm
Hi
I'm using the compute field to generate an api key, only I don't want it to re-run the script every time I save the page, only on insert.
I'm not sure what approach I should take.
Thanks in advance
Matt
Comments
Me too!
I could really do with some help on this as well (for slightly different reasons!).
Can anyone help?
thx
Sorted
To get the computed field to only generate first time around is a simple as wrapping this around your computed code
if ($node_field[0]['value'] == '' )
{ $node_field[0]['value'] = "hello" ; /* only work on insert and not on upates */ }
Thanks to jaxta who helped on this
Matt
www.crawlscore.com
Matt Burke
Uk Drupal Developer
Adaptive - Drupal Developers
My Tunstall, Community portal with a history running on Drupal 4.7,5 and 6