× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

How to fill in default values in create form?

More
10 years 1 week ago #2827 by Frank
I would like to set creation date on new entry. I have 'on update' timestanp in DB, so this is reserved.
Is this possible?? I ried referring php script in template with no success.. Like:

<dd>
<input type="text" name="oprettet" id="jform_oprettet" value="<?php print(date('Y-m-d H:i:s')); ?>" >
</dd>

Please Log in to join the conversation.

More
10 years 1 week ago #2834 by Dirk
If you define a default value for a Field in Mysql it will be automatically set as Value.

But you want to use PHP to insert a date. That will work only if you use a plugin to execute PHP in content.
Like DirectPHP

You could use Javascript also!

Please Log in to join the conversation.

More
10 years 1 week ago #2837 by Frank
Thx! DirectPHP did the trick :-)

Please Log in to join the conversation.

Moderators: Dirkjoest