Hi,
as read on this faq : https://www.chronoengine.com/faqs/61-cfv4/cfv4-tutorials/4133-how-can-i-create-a-pdf-including-form-results.html
1) I've put a custom code before tcpdf action with this code:
2) I've set the tcpdf action:

3) I've created put a custom code after tcpdf action with this code:

Any advice?
Thanks!
as read on this faq : https://www.chronoengine.com/faqs/61-cfv4/cfv4-tutorials/4133-how-can-i-create-a-pdf-including-form-results.html
1) I've put a custom code before tcpdf action with this code:
<?php
$form->data['pdf_file_name'] = 'Preventivo_IX_per'.'_'.$form->data['name'].'_'.date("Y-m-d_h:i:s");
?>
2) I've set the tcpdf action:

3) I've created put a custom code after tcpdf action with this code:
<?phpERROR: The problem is that the debugger show the field pdf_link empty:
$form->data['pdf_link'] = "<a href='{$form->files['cf_pdf_file']['link']}' >Click here</a>";
?>

Any advice?
Thanks!
Solve thanks!
Sorry I thought I solved it but I didn't.
I'll make a new post.
I'll make a new post.
https://www.chronoengine.com/forums/posts/t106016/action-tcpdf-attach-file-to-email-with-customize-file-name
Hi M.Abletech,
Do you have your Email action after the TCPDF action?
If you add a Debugger action after your Custom Code action you should be able to see if the link is being created correctly.
In the examples I saw in your first post here the Debugger data shows that the files data is wrong - the value of the link is the same as that for the path. That's a CF bug that I thought had been fixed, if not you can add to your custom code to change the value to the correct url for the file.
Bob
Do you have your Email action after the TCPDF action?
If you add a Debugger action after your Custom Code action you should be able to see if the link is being created correctly.
In the examples I saw in your first post here the Debugger data shows that the files data is wrong - the value of the link is the same as that for the path. That's a CF bug that I thought had been fixed, if not you can add to your custom code to change the value to the correct url for the file.
Bob
thank you!
So you mean I need to update [preventivo][link] with a custom action between tcpdf action and mail action?
And changing the value from the relative path to the url?
Thanks
So you mean I need to update [preventivo][link] with a custom action between tcpdf action and mail action?
And changing the value from the relative path to the url?
Thanks
This topic is locked and no more replies can be posted.