I want only admin to be able to create entries, but want to be able to set a specific UID that can view it. eg admin enters the data and specifies a UID of "smith" (separate UID)
I have the following sections of code in the respective files:
default.cfg:
---------------
%db_def = {
'UID' => [1, 'alpha', -2, 10, 0, '', '' ],
$auth_user_field = 1 (correct field in DB)
----------------
html.pl:
under "sub html_record_form", I have the following:
------------------
if ($per_admin) {
print qq|
<TR><TD><$font>User ID:</FONT></TD>
<TD INPUT TYPE="text" NAME="UID" VALUE="$rec{'UID'}"></TD></TR>|;
}
else {
print qq|<INPUT TYPE="hidden" NAME="UID" VALUE="$rec{'UID'}">|;
}
...
This brings up a text field on the form, but whatever is written here is replaced by "admin" for the UID.
How can I get this to keep and use the text I enter as the UID?
I have the following sections of code in the respective files:
default.cfg:
---------------
%db_def = {
'UID' => [1, 'alpha', -2, 10, 0, '', '' ],
$auth_user_field = 1 (correct field in DB)
----------------
html.pl:
under "sub html_record_form", I have the following:
------------------
if ($per_admin) {
print qq|
<TR><TD><$font>User ID:</FONT></TD>
<TD INPUT TYPE="text" NAME="UID" VALUE="$rec{'UID'}"></TD></TR>|;
}
else {
print qq|<INPUT TYPE="hidden" NAME="UID" VALUE="$rec{'UID'}">|;
}
...
This brings up a text field on the form, but whatever is written here is replaced by "admin" for the UID.
How can I get this to keep and use the text I enter as the UID?