TCPDF With PHP Variables

fj fjsosat 13 Jul, 2018
Hi, I'm facing an issue trying to generate a PFD document with Chronoforms 6.
​
I'm trying to print a random number in the form but it is not showed the portion of the code is
​
... html ....
<tr><td>Nro:
<?php
$d=mt_rand(1, 999999999);
echo $d ;
?>
</td>
...html....
it seems that the php code is ignored and nothing is echoed in the output pdf.
​
I would like to know if we can do this kind of things allowed with Chronoforms 5.
​
Thank you in advance
Gr GreyHead 18 Jul, 2018
Hi fjsosat,
​
The simplest way is to use PHP action before the TCPDF action to create the variable code you need in the form data and then include the value as a short code in the TCPDF template.
​
Bob
This topic is locked and no more replies can be posted.