Dear forum
In previous CF versions, it was possible to add a custom code into the submit action, that sent the date of submission and could be included in the confirmation e-mail as {date}, or rather {data:date} by using this PHP:
Secondly, there used to be a GU id creator module, through which one could also create and include a genuinely unique ID, say, for billing purposes.
I have failed to either implement or find answers on how to do either of these two things in CFv6.
Many thanks for any help
Christopher
In previous CF versions, it was possible to add a custom code into the submit action, that sent the date of submission and could be included in the confirmation e-mail as {date}, or rather {data:date} by using this PHP:
<?php$form->data['date'] = date('d-m-Y H:s');?>When I try to add the date to the e-mail content, it doesn't appear anymore.
Secondly, there used to be a GU id creator module, through which one could also create and include a genuinely unique ID, say, for billing purposes.
I have failed to either implement or find answers on how to do either of these two things in CFv6.
Many thanks for any help
Christopher
{date:format}
For example
{date:d-m-Y H:s}
Look at the FAQs and the manual.
For a uuid, use
{uuid:}
Hello healyhatman,
I did both these things but all the variable codes do are displaying date/UUID in the form or on the message page (when placed as submit action). My question was how to get this data into an e-mail? The handbook and FAQ don't present the answer to this.
Thanks for your reply!
Christopher
I did both these things but all the variable codes do are displaying date/UUID in the form or on the message page (when placed as submit action). My question was how to get this data into an e-mail? The handbook and FAQ don't present the answer to this.
Thanks for your reply!
Christopher
Put it in the email body mate. Put it wherever you want, other than in PHP code.
Easy if you know it. I was following the 'old' logic of customizing, 1. creating AND 2. including in the email, guess this works, too. I'll find out...
Thanks again!
Christopher
Thanks again!
Christopher
One more question, though: I've decided to use {rand:} rather than {uuid:} (a bit too long).
Is there way to set min and max or number of digits? There is a nice php manual online about the different date formats and wondered if there's sth like that for random numbers as well. I've tried (for 3 digits):
Is there way to set min and max or number of digits? There is a nice php manual online about the different date formats and wondered if there's sth like that for random numbers as well. I've tried (for 3 digits):
{rand:000,999}, {rand:(100,999) }, {rand:$100,$999}, {rand(100,999):} - as well as {mt_rand:}
The curly bracket shortcodes are only for specific things you can't just put any PHP function name in there.
I don't think there's a way to do what you want without using a PHP block.
I don't think there's a way to do what you want without using a PHP block.
Alrighty, thanks anyway!
This topic is locked and no more replies can be posted.