I got this to work fine with the non-SQL version - to automatically fill certain fields when a user wants to add another record - BUT, when I put it in my SQL version it does not work at all - no error - just leaves fields blank.
Here is what I put in html.pl :
In sub html_record_form (after)
my (%rec) = @_;
(added)
if ($in{'add_form'}) { $in{$db_cols[$auth_user_field]} = $db_userid; my ($status2,@hits2) = &query("mod"); if ($status2 eq 'ok') { %rec2 = &array_to_hash(0,@hits2);# At this point, assign the fields that you want to autofill $rec{'FieldName'} = $rec2{'FieldName'}; }}
Any thoughts would be apprecited,
Jim
Here is what I put in html.pl :
In sub html_record_form (after)
my (%rec) = @_;
(added)
if ($in{'add_form'}) { $in{$db_cols[$auth_user_field]} = $db_userid; my ($status2,@hits2) = &query("mod"); if ($status2 eq 'ok') { %rec2 = &array_to_hash(0,@hits2);# At this point, assign the fields that you want to autofill $rec{'FieldName'} = $rec2{'FieldName'}; }}
Any thoughts would be apprecited,
Jim