Gossamer Forum
Home : Products : DBMan : Customization :

Userid and Date

Quote Reply
Userid and Date
Is it possible to attach a userid and date to a feild when modified?

Example. A text feild is left blank. Is is possible to have the date and userid of the person that modified that specific field to print out from then on?

Quote Reply
Re: Userid and Date In reply to
I would recommend adding two new fields:

1) Mod_Date
2) Mod_UserID

Configure the first field similar to how you configured the Date field. The other field should be configured as the UserID field if you have one.

Regards,

Eliot Lee

Quote Reply
Re: Userid and Date In reply to
I tried that. It just took the date and ID from the first time around.

mmmm...I wonder if i added a if statement in there, and didnt even print the fields.....mmmm Please tell me ideas if mine doesnt work. If it does ill tell you. Thanks!

Quote Reply
Re: Userid and Date In reply to
What you need to do is add hidden fields in your sub html_record form:

Code:

<input type="hidden" name="Date" value="$rec{'Date'}">
<input type="hidden" name="Date" value="$rec{'Mod_Date'}">


I use this in my sites and it works.

Regards,

Eliot Lee

Quote Reply
Re: Userid and Date In reply to
In

<input type="hidden" type="Date" value="$rec{'Date'}"><input type="hidden" type="Date" value="$rec{'Mod_Date'}">

Is that type="Date" supposed to be name="Date"? I dont have a type in my entries twice.


Quote Reply
Re: Userid and Date In reply to
Oopss..I made a mistake in my previous post...I edited it.

Regards,

Eliot Lee

Quote Reply
Re: Userid and Date In reply to
Ok I did that. but I get an error....Invalid date format Date1

I used the feild names Date 1-9 ie Date1 Date2 etc...

They arent even printing out until the other fields are filled. Should i have them there and just keep them hidden? and if i did that woudlnt it just print the first date?

Quote Reply
Re: Userid and Date In reply to
If you want to print them...simple add $rec{'Date'} and $rec{'Mod_Date'} after the hidden fields. The Invalid Format error probably deals with improperly editing the date subroutines in the db.cgi file.

Regards,

Eliot Lee

Quote Reply
Re: Userid and Date In reply to
I think i have not said whats going on very clear. My bad...ill try again. Thanks for bearing with me.

Each Notes field, "Notes1 Notes2" and so on is set that they dont even print out if the predecessor is blank. It allows for people to respond to one another.

Im trying to make it so that each response, will have the Userid and date attached.

So i have them set not to even print out.

Well, the userId feild doesnt grab the user id like the nomral one that is set in teh .cfg file. Is there a way to make it do that, but only when the feild that is with it is modified?

And the date, well i tried teh same thing, but i dont think its taking becauswe the feilds are totally blank because they didnt even print out so i get the error. any way around that?