Gossamer Forum
Home : Products : DBMan : Customization :

Trying to hide data until approved...

Quote Reply
Trying to hide data until approved...
I'm trying to set it up so that when a teacher enters their class it defaults to "hidden" so that if students typed in that class it would not show up. When the class is approved then it would be "visible" to everyone and work like normal.

Is this posible?

My idea is like this:

if ($rec{'View Status'} eq "0"){
#hide line
}else ($rec{'view Status'} eq "1"){
#show line
}

But I have no idea where to put it? Or if 'm even thinking right?
I would love all the help I can get.

Thanks,
brett : )
Quote Reply
Re: Trying to hide data until approved... In reply to
Try
if ($rec{'View Status'} == 1){
print qq| $rec{'class_field'} |; }
Replace class_field with the name of your class field.
Put this in sub html_record, or where ever you wish it to print.
If if dosn't work. try unless instead.
Remember to add an |; before the statement to terminate the previous print qq|, and a print qq| after.

Bob
Quote Reply
Re: Trying to hide data until approved... In reply to
Hi Bretnett,
It sounds like you need the validation mod.
This nice mod by JPDeni allows the administrator to validate records before they are viewable by the public.
You can get the mod at:
http://www.jpdeni.com/dbman/Mods/validate1.txt

and read about it at;
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/000758.html

Good luck, I am also using it and very happy with the way it works.

------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net