I am sure this should not be a problem, but somehow I got stucked with it.
I need to autofill the email field in my item db add_form with the email field in the user db. It's been made quite clear by JPD in her Relational mod and is implemented in sub html_record_long with the following codes:
my (%rec) = @_;
&switch_to_user;
$rec{'UserID'} =~ s/<.?B>//g;
%rec2 = &get_record($rec{'UserID'});
&switch_to_item;
For display, using: $rec2{'UserEmail'}", It works fine in sub html_record_long.
However, when I copied these codes to sub html_record_form, it does not work! The email address never shows up. I could not figure out what's wrong. Could somebody point out to me. Thanks in advance.
Long
I need to autofill the email field in my item db add_form with the email field in the user db. It's been made quite clear by JPD in her Relational mod and is implemented in sub html_record_long with the following codes:
my (%rec) = @_;
&switch_to_user;
$rec{'UserID'} =~ s/<.?B>//g;
%rec2 = &get_record($rec{'UserID'});
&switch_to_item;
For display, using: $rec2{'UserEmail'}", It works fine in sub html_record_long.
However, when I copied these codes to sub html_record_form, it does not work! The email address never shows up. I could not figure out what's wrong. Could somebody point out to me. Thanks in advance.
Long