Gossamer Forum
Home : Products : DBMan : Customization :

(can't find requested record) help needed..

Quote Reply
(can't find requested record) help needed..
I got a small problem that I canīt figure out..

Certain users have permissions to modify only their own records.. As only admin needs to see the ID field, Ref Field I hid these by using if ($per_admin)and all the rest of the fields that needed to be modified I used if (($per_admin) or ($per_mod)).. It works fine, If I enter with modify permissions, I get only the records I need to see and only the fields I need to modify..

However.. My first problem was that in my default.cfg ID, and Ref. had not_null turned on and it came up with cannot leave fieds blank.. I fixed this, now I get this error message.. (can't find requested record)

Any Ideas caus I run out of them.. let me know if you want to see my html.pl and default.cfg..

Thanks..

Just a thought.. could I make all fields appear, caus Itīs usfull for the modifier to see the Ref but not be able to change the value, only the admin can..


[This message has been edited by justin (edited May 14, 2000).]
Quote Reply
Re: (can't find requested record) help needed.. In reply to
The thing to do is to set up hidden fields in sub html_record_form:

Code:
if ($per_admin) {
print qq|<input type="text" name="FieldName" value="$rec{'FieldName'}">|;
}
else {
print qq|<input type="hidden" name="FieldName" value="$rec{'FieldName'}">$rec{'FieldName'}|;
}
Every field in your .cfg file must have a corresponding field in sub html_record_form. You can make the field hidden, but it must be there.