For a registration form that sends automatically a gift certificate with limited use date, I am looking for a simple way to add to the confirmation email a field that would calculate automatically this date equivalent to the registration date +21 days.
Any tutorial for this?
Thanks for your help.
Any tutorial for this?
Thanks for your help.
Hi faraon,
I found this StackOverFlow answer that you can use in a Custom Code action.
Bob
I found this StackOverFlow answer that you can use in a Custom Code action.
<?php
$date = strtotime("+21 day");
$form->data['expires'] = date('M d, Y', $date);
?>
Then use {expires} in the Email template.Bob
Thanks a lot Bob, looks like the solution, but unfortunately I used "Custom Element (HTML/PHP)" and it does not work.
It does not reflect in the email any value (or even if I try the confirmation message)...
It does not reflect in the email any value (or even if I try the confirmation message)...
Hi faraon,
Please try putting it into a Custom Code action in the On Submit event of your form (or the Custom Code Before Email box if you are using the Easy Wizard).
Bob
Please try putting it into a Custom Code action in the On Submit event of your form (or the Custom Code Before Email box if you are using the Easy Wizard).
Bob
This topic is locked and no more replies can be posted.