Hi!
Originally I would like to send the uniq_id as a key within my email to the form submitter.
I found this http://www.chronoengine.com/forums/posts/t94981/p326799/chrono-forms-v5-unique-id.html#p326799 article and built a small form like this
The code is
The form setup is
.
The custom code is
And the email-template is
The debugger output is
and the correspondig email is
What is wrong?
I'd also like to do something like this in the custom code:
uniqueid is set to uniq_id (which was generated by chrono forms/joomla/mysql), but
$form->data['uniqueid'] = $form->data['uniq_id'];
does not work.
Any help is very much apreciated.
Thanks in advance
Originally I would like to send the uniq_id as a key within my email to the form submitter.
I found this http://www.chronoengine.com/forums/posts/t94981/p326799/chrono-forms-v5-unique-id.html#p326799 article and built a small form like this

The code is
<div class="form-group gcore-form-row" id="form-row-email"><label for="email" class="control-label gcore-label-left">E-Mail</label>
<div class="gcore-input gcore-display-table" id="fin-email"><input name="email" id="email" value="xxx@zzz.yyy" placeholder="" class="validate['required','email'] form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><input name="uniqueid" id="uniqueid" value="" type="hidden" class="form-control A" /><div class="form-group gcore-form-row" id="form-row-senden"><div class="gcore-input gcore-display-table" id="fin-senden"><input name="senden" id="senden" type="submit" value="Senden" class="btn btn-default form-control A" style="" data-load-state="" /></div></div>
The form setup is

The custom code is
<?php
$uid = $form->data['cf_id'] + 1126;
$uid = sprintf('%04d', $uid);
$uid = 'MRIT-ID_'.$uid;
$form->data['uniqueid'] = $uid;
?>
And the email-template is
<table>
<tr><td>E-Mail</td><td>{email}</td></tr>
<tr><td>uniqueid</td><td>{uniqeid}</td></tr>
</table>
.
The debugger output is
Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => tst
[event] => submit
[Itemid] =>
[email] => xxx@zzz.yyy
[uniqueid] => MRIT-ID_1166
[senden] => Senden
[cf_id] => 40
[ip_address] => <CENSORED>
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
[11] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
[0] => INSERT INTO `sx7qh_cf_tst` (`email`, `uniqueid`, `user_id`, `uniq_id`, `created`) values ('xxx@zzz.yyy', '', '0', '3aaa00c7bb1faea70452d379518cea350eecdc00', '2016-05-01 11:22:45');
)
)
)
[0] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully:
[1] => To:xxx@zzz.yyy
[2] => Subject:tst
[3] => <CENSORED>
[4] => <CENSORED>
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:
[9] => Attachments:
[10] => Array
(
)
[11] => Body:
<table>
<tr><td>E-Mail</td><td>xxx@zzz.yyy</td></tr>
<tr><td>uniqueid</td><td></td></tr>
</table><br /><br />IP: >CENSORED>
)
)
)
and the correspondig email is
E-Mail xxx@yyy.zzz
uniqueid
IP: <CENSORED>
What is wrong?
I'd also like to do something like this in the custom code:
uniqueid is set to uniq_id (which was generated by chrono forms/joomla/mysql), but
$form->data['uniqueid'] = $form->data['uniq_id'];
does not work.
Any help is very much apreciated.
Thanks in advance