I was looking for a solution to the whole time/date stamp as a hidden field thing and noticed others had expressed curiousity, too. I think I've found a solution.
1. Go through the whole create a form process and make a hidden field and give it a name like stamp.
2. After your forms were created, open the process.php file. Add this line
"$dtstamp=date("m.d.Y, H:i:s");" to line three of the file (it should be right after the include global line).
3. Do a search and replace to replace the $stamp with $dtstamp.
Viola! The date stamp now shows up in the email, the php-generated thank you page and the flat file. (I didn't try it on the mysql database. I'ld be interested to hear how it works.)
Regards,
StrunkWriter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Replace the word OFFSET with the number of hours you want to offset the server time by. You can go either +OFFSET or -OFFSET to go forward or backward. I just came up with this line of code from the top of my head and I haven't tested it out, so it may or may not work. Also, again these are just hacks... I will add this time stamp feature in the next version officially.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you update this hack for version 3.0? It does not seem to be working for me.
"$stamp " in Step 3 doesn't exist.
I am sending the data to both email and "formdata.txt" but not to a database.
Can someone please help?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was looking for a solution to the whole time/date stamp as a hidden field thing and noticed others had expressed curiousity, too. I think I've found a solution.
1. Go through the whole create a form process and make a hidden field and give it a name like stamp.
2. After your forms were created, open the process.php file. Add this line
"$dtstamp=date("m.d.Y, H:i:s");" to line three of the file (it should be right after the include global line).
3. Do a search and replace to replace the $stamp with $dtstamp.
Viola! The date stamp now shows up in the email, the php-generated thank you page and the flat file. (I didn't try it on the mysql database. I'ld be interested to hear how it works.)
Regards,
StrunkWriter
good suggestion.
I followed your directions and it works in email, online database and in the MySql database.
Thanks
Works great, thanks for posting.
I am in a different timezone then my server is.
Is there a way to add an offset to time so that localtime is displayed.
TIA
Try using the following for Step 2:
$dtstamp = date(("m.d.Y, H:i:s"), mktime(date("G")+OFFSET, date("i"), date("s"), date("m"), date("d"), date("Y")));
Replace the word OFFSET with the number of hours you want to offset the server time by. You can go either +OFFSET or -OFFSET to go forward or backward. I just came up with this line of code from the top of my head and I haven't tested it out, so it may or may not work. Also, again these are just hacks... I will add this time stamp feature in the next version officially.
How about posting under patches - so it can be found easily.
Can you update this hack for version 3.0? It does not seem to be working for me.
"$stamp " in Step 3 doesn't exist.
I am sending the data to both email and "formdata.txt" but not to a database.
Can someone please help?