Hello,
I’ve created a form where I collect the date of purchase of a particular item. I collect the Month (values from 01 to 12 (values from 01 to 31) and Year (values from 2001 to 2010). In the email that gets sent out to the user we need to specify the expiry date, which is exactly 2 years from the date of purchase so I can simply do this for month and day in the response chunk:
<p>Your warranty expires on (month/day/year): [+purchase_month+] - [+day+] - YEAR + 2 GOES HERE.
My PHP is infrequent and poor but I wrote a Snippet:
<?php
$y=$modx->getPlaceholder('purchase_year');
$ex=$y +2;
echo $ex;
?>
I’m not sure however if this correct and if so, how to get it purchased and return the value into the standard eForm response chunk. Has anyone any experience doing something similar?