Hi,
I would like to have a link to my pdf file into the thanks message.
So, I have put a custom code before the email action with this
The debugger returns this :
I thought I had just to put {pdf_link} into the content of thanks message... But the message just displays {pdf_link} and not the link...
What I have missed ?
Thanks in advance for reply
I would like to have a link to my pdf file into the thanks message.
So, I have put a custom code before the email action with this
<?php
$form->data['pdf_link'] = "<a href='{$form->files['my_pdf_file']['link']}' >Click here</a>";
?>
The debugger returns this :
Array
(
[my_pdf_file] => Array
(
[name] => animation_20160526111419.pdf
[path] => /MY_PATH/components/com_chronoforms5/chronoforms/pdfs/renseignements-animation/animation_20160526111419.pdf
[size] => 0
[link] => http://MY_DOMAIN/components/com_chronoforms5/chronoforms/pdfs/renseignements-animation/animation_20160526111419.pdf
)
)
I thought I had just to put {pdf_link} into the content of thanks message... But the message just displays {pdf_link} and not the link...
What I have missed ?
Thanks in advance for reply
Hi Le Pache,
That all looks OK, Is the TCPDF action before the Custom Code action?
Bob
That all looks OK, Is the TCPDF action before the Custom Code action?
Bob
Yes, Bob, it is.
Here is the content message :
Here is the content message :
<p>Merci</p>
<p>Télécharger ici {pdf_link}</p>
Hi Le Pache,
By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.
Bob
By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.
Bob
Hi Le Pache,
Fixed I think, this was on odd one that I haven't seen before.
In the custom code you have $form->data but the dash in there was a Unicode Hyphen character instead of a plain ordinary dash so it broke the PHP. They look identical so it's not obvious to see until you start debugging.
Bob
Fixed I think, this was on odd one that I haven't seen before.
In the custom code you have $form->data but the dash in there was a Unicode Hyphen character instead of a plain ordinary dash so it broke the PHP. They look identical so it's not obvious to see until you start debugging.
Bob
Hi Bob,
You are a champ !
It is running now.
Perhaps it would be good for others to correct this post : https://www.chronoengine.com/forums/posts/f5/t100999.html because i have done a copy-paste of your code there.
Thanks for all again !
Marion
You are a champ !
It is running now.
Perhaps it would be good for others to correct this post : https://www.chronoengine.com/forums/posts/f5/t100999.html because i have done a copy-paste of your code there.
Thanks for all again !
Marion
This topic is locked and no more replies can be posted.