[TYPO3] db integration (wfqbe 1.0.5) - insert form, automatic date stamp to db

Darko Jr. Gonzalez jkokino at gmail.com
Sun Oct 21 23:40:35 CEST 2007


Heya folks

I had little discussion with Mauro about this, anyway, of course he is
right, and I should be posting this here, not got abit more time. Here is my
question again:

I am finally for the first going in depth with this extension. Thanks for
sharing! I am not a php coder per se, so I have a simple request/question.
Quote a paragraph from the manual "It's not enough: we want to save the
characters in a specific page (pid) and to save the creation date (crdate)
but we don't want the users to modify this values (to obtain this behavior
you can use the hidden type or the PHP function type).". I am trying for an
hour or so to set this PHP function type field to get the server date and
insert into the database field. No success really.
1.
<?php
$today = date("Y-m-d");
echo $today;
?>

2.
date("Y-m-d");


And all sorts of combination. Now I have some thoughts and I think I
shouldnt be using PHP function type, maybe use hidden and get servers date
somehow.
If I use hidden static date which goes to db on insert then all is fine. :)
I need this format YYYY-MM-DD. So when I fill even an input field this way
it works well.
The date field is of type "date"

I read the manual, I see something about crdate and customprocess but I am
not sure I need that?!


Thanks for looking
Please let me know either way, if you can help or not.


Regards,
Darko
P.S. Mauro suggested using return, e.g. return time(); or return
date("Y-m-d", time());
Didnt work. Nothing is written to the db.


More information about the TYPO3-english mailing list