Gossamer Forum
Home : Products : DBMan : Customization :

Admin changable field but only viewable to user

Quote Reply
Admin changable field but only viewable to user
I wish to be able to have a field that is editable by admin only for each user and is shown to the user in there data

i.e I wish to have a drop down box when the admin logs in and and modifys any user info in the database
New Member and Member selection in drop down box

When the users want to modify there data they see it but cant change it and when users do a search they can select new member or member. Also when you "list all" the field is shown (New member or Member .. depending what the admin has set for each user)

Quote Reply
Re: Admin changable field but only viewable to user In reply to
So, in sub html_record, you want the value of the field to show. That's easy! Smile

And in sub html_record, you want the select list to show if either of the following conditions are met:

1--the user is doing a search
2--a user with admin permission is modifying the form

All other times the field should be hidden.

Code:

if ($in{'view_search'} or $per_admin) {
print &build_select field.....
}
else {
print qq|<input type="hidden"....|;
}
JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Admin changable field but only viewable to user In reply to
im lost...

What i want is a drop down select box only admin can use and the selections are Memeber and New member

All users can view what has been selected for them from anywhere but cannot change it (ie from "modify" or "list all"). But it will be deleted if they want to delete there record.

And i would like users to be able to search by New Member or Member.

The database users can only modify or delete there own record and only have 1 record.

Hope this explians it better ...
Thanx

Quote Reply
Re: Admin changable field but only viewable to user In reply to
Why don't you post your sub html_record_form here and I'll show you where to put the code.

Oh, wait a minute. Are you using the autogenerate function? If so, you can't do what you want to do. You'll have to build your own sub html_record_form.

JPD
http://www.jpdeni.com/dbman/