Form Email Plugin

Status
Not open for further replies.

stevelis

Member
Is it possible to insert the current date into the message text box of this plugin and have it formatted just for the year.
 
hi, the complete timestamp can be done with:
PHP:
{mysql_date}
Now how to limit it on just the year? Maybe someone else can give you a better answer.
 
thanks wuschel_lux
Yes the {MySQL_date} worked and displayed the full time stamp.
I had a few minutes to spare before work at the formatting (current year only, 2019) but none were successful so far.
Will keep trying and welcome any formatting suggestions.
Steve
 
Thanks for the suggestions but I am not sure whether this can be achieved in the Email Form Plugin, Options tab > Message Text box.
Note: the {mysql_date} placeholder does insert the full timestamp. Not sure what code will split the year from the timestamp in the message box.
Here is the part of text using the element placeholders and where I am trying to insert the 'year' part of the timestamp.

<div><span style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><strong>{calendar___Event}</strong> being conducted at<strong> {calendar___Location}</strong></span>
</div>
<div><span style="font-family: arial,helvetica,sans-serif; font-size: 12pt;">and commencing on the<strong> {calendar___StartDate} </strong>and finishing on the<strong> {calendar___enddate},
$date = '{mysql_date}'; $year = explode("-",$date) [0]; return $year; </strong></span>
</div>

Steve
 
Hi troester
I have manually added 2019 into the message for the time being whilst I work on a PHP template as you have suggested.
Steve
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top