Gossamer Forum
Home : Products : DBMan : Discussions :

Time Field

Quote Reply
Time Field
Hi,
I have a field (called GMT) which uses the get_time sub routine, I have made this field hidden, because I don't want the use to be able to chage it. It also has a default value which it gets from the sub routine, however when I try and enter the record I get an error message saying "GMT (Can not be left blank)" How can it be blank, it should be getting the time from get_time!
Any ideas? It used to work, I'm sure of it.
Ben

Quote Reply
Re: Time Field In reply to
I figured you could probably just put a "hidden" value on the input field, so to verify this I went a did a little search on this forum... looked for "read only" and got a message posted on October 13th, 2000 dealing with EXACTLY the same issue. You might want to do a search as many items people ask about have already been discussed.

Here's the link, http://www.gossamer-threads.com/perl/forum/showthreaded.pl?Cat=&Board=DBCust&Number=109147&page=&view=&sb=&vc=1#Post109147

and the answer:

if ($per_admin) {
print qq|<input type="text" name="GMT" value="$rec{'GMT'}" size="10">|;
}
else {
print qq|<input type="hidden" name="GMT" value="$rec{'GMT'}">$rec{'GMT'}|;
}


Conor Treacy
-----
www.HandsonWebDesign.com
Quote Reply
Re: Time Field In reply to
Cheers,
Great your a life saver thanks for your help!
Ben