Hello,
I was used to write some php function in old TCPDF for CF5. Is still possible in TCPDF for CF6?
Because I'm trying some basic code but is not working, only html and {data:field_name}.
Thanks
I was used to write some php function in old TCPDF for CF5. Is still possible in TCPDF for CF6?
Because I'm trying some basic code but is not working, only html and {data:field_name}.
Thanks
Hi vismay,
I don't' know if you can use PHP in the action in CFv6 :-(
What you can of is use a custom action before the action to build the HTML you need, add it to the form data and then display it in the TCPDF action.
Bob
I don't' know if you can use PHP in the action in CFv6 :-(
What you can of is use a custom action before the action to build the HTML you need, add it to the form data and then display it in the TCPDF action.
Bob
Hi,
In v6 it can be done using either the old method explained by Bob or by using a PHP function and returning the end value then using {var:php_name} in the contents of the TCPDF.
The custom code itself can also be configured to set the output as a variable for later usage.
Best regards,
Max
In v6 it can be done using either the old method explained by Bob or by using a PHP function and returning the end value then using {var:php_name} in the contents of the TCPDF.
The custom code itself can also be configured to set the output as a variable for later usage.
Best regards,
Max
I can understand, but how I can transfer to tcpdf such a function:
if ( $conta == 1 ) {
echo "";}
else {
foreach ( $form->data['recipient'] as $k => $v ) {
echo "<div><strong>{$v['name']} {$v['cognome']}, {$v['nascita']} {$v['nascita_o']} {$v['nascita_oso']} {$v['gg']}-{$v['mm']}-{$v['yyyy']}, {$v['cittadinanza']} ({$v['sesso']})</strong></div>";
}
}
Hi vismay,
Is this code inside a PHP function ?
If yes then just move it inside a "custom code" action instead and use a php tag before the code <?php, then enable the "return result as var" setting, if the "custom code" is before the TCPDF then you can use this to get the code results:
{var:custom_code_name}
Best regards,
Max
Is this code inside a PHP function ?
If yes then just move it inside a "custom code" action instead and use a php tag before the code <?php, then enable the "return result as var" setting, if the "custom code" is before the TCPDF then you can use this to get the code results:
{var:custom_code_name}
Best regards,
Max
This topic is locked and no more replies can be posted.