Forums

how to dinamically add timestamp to the email sent after form submission?

oloccina 27 Feb, 2014
Hello,
I have a simple form with name and email action activated.
I'd need to add timestamp (date when the email is being sent or the form being submitted)
automatically to the mail the user receives.

I know the email will normally have a date, but I need to add a date inside the mail message.

In the email action I don't see any option for this, just a dynamic option to
insert the user IP address. Is there any way to do it?
thank you
N.
GreyHead 27 Feb, 2014
2 Likes
Hi oloccina,

Add a Custom Code action to the Form On Submit event before the Email action and add code like this to it
<?php
$form->data['date'] = date('Y-m-d H:s');
?>
Then add {date} to the email template. You may also want to change the date format string to suit your needs.

Bob
oloccina 27 Feb, 2014
thank you!
that worked like a breeze :-)
This topic is locked and no more replies can be posted.