Hi,

would be a nice option to set the default value to the latest field value.

at the moment i do it like this, with default_php:

$res = db_query("SELECT nid FROM node WHERE type = 'mytype' ORDER BY nid DESC LIMIT 1");
$dat = db_result($res);
$res = db_query("SELECT myfield_value FROM content_myfield WHERE nid = $dat ORDER BY delta");
while($dat = db_fetch_array($res)) {
  $dats[] = array('value' => $dat['myfield_value']);
}
return $dats;

an easy checkbox to say "get latest as default" would be very nice. i would write a patch but i dont know were to start...

regards pebosi

Comments

karens’s picture

Makes sense and probably would be a nice addition. I have no time or plans to work on this, but maybe someone else is interested enough to try to make a patch.