Ok, I used Eliots Add Feild mod...twice, Thank you for that. anyways, one of the fields i added was the date field. There is no default value...I set up the .cfg file just like normal for a date feild. When i try to modify anyting, it tells me invalid format, and can not be blank. How can i just get it to fill in a date, or something, preferably when it is modifed 1st after the Mod, then never again.. Thanks
Jul 26, 2000, 12:23 AM
Veteran / Moderator (8669 posts)
Jul 26, 2000, 12:23 AM
Post #2 of 4
Views: 1333
Off the top of my head, this is what I came up with.
In sub html_record_form, after
my (%rec) = &get_record($in{'modify'});
if (!%rec) { &html_modify_failure("unable to find record/no record specified: $in{'modify'}"); return; }
add
$rec{'Date'} = &get_date;
If it's a hidden field, you won't have to worry about them changing it. If it's not a hidden field, there's going to be some more work to do to prevent them from changing it -- if it's really important that it not be changed.
JPD
http://www.jpdeni.com/dbman/
In sub html_record_form, after
my (%rec) = &get_record($in{'modify'});
if (!%rec) { &html_modify_failure("unable to find record/no record specified: $in{'modify'}"); return; }
add
$rec{'Date'} = &get_date;
If it's a hidden field, you won't have to worry about them changing it. If it's not a hidden field, there's going to be some more work to do to prevent them from changing it -- if it's really important that it not be changed.
JPD
http://www.jpdeni.com/dbman/