Do you want the "week later" date entered when the record is added?
If so, I would copy the get_date subroutine and put it in another subroutine -- call it get_date7. It would be like:
Code:
sub get_date7 {
$time = time() + 604800; # 604800 = 7 days times 86400 seconds per day
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $daylight) = localtime($time);
my (@months) = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
($day < 10) and ($day = "0$day");
$year = $year + 1900;
return "$day-$months[$mon]-$year";
}
Put the above subroutine somewhere in db.cgi. (It can go anywhere, really, as long as it's not in the middle of another subroutine.)
Then, in the .cfg file, in the field definition where you want this to go, put
&get_date7
for the default value.
------------------
JPD
All my advice is offered on the basis of kindness-ware. If I've helped you to solve a problem, go out of your way to be kind to someone today.