Forums

TCPDF V5 Thank you page after PDF Download

sem 03 Nov, 2014
Hi - been experimenting with TCPDF action - it's neat. Problem is (or has anyone solved this) with a forced download of the pdf (which works perfectly), although an email is sent fine, a user is stuck at the completed form page - no thank you message is displayed - I had a quick forum search but apart from embedding a link to a thank you page within the pdf itself, there's no mention I could find of displaying a thank you web page as confirmation.

sem
GreyHead 04 Nov, 2014
Hi sem,

I've experimented with this a bit and now I don't use the immediate download option if there is any action to follow - like a thank you message. I'm sure that it ought to be possible but I haven't found out how to do it reliably cross-browser.

I usually just save the PDF file on the server and add a link into the Thank you message.

Bob
sem 04 Nov, 2014
Hi Bob - I've been playing some more - sorry would have updated this post but it wasn't approved.

I've done the save action only and my display message appears. I've also done the email attachment and it's working beautifully. So, what I could do with doing is putting a link on the thanks page for the user to be able to download the pdf - is this possible at this point?

sem
GreyHead 04 Nov, 2014
1 Likes
Hi sem,

If you add a Debugger temporarily and check the output you should see that the URL for the pdf has been added to the $form->data[''] array. You can use that value in the Thank you page in a normal <a> link.

Bob

PS Some versions of CF had a bug where the path for the file was included twice instead of the path and the URL - I think that's been fixed but ask again if it hasn't.
sem 04 Nov, 2014
Bob - you're a genius. Thanks!

sem
sem 04 Nov, 2014
OK! I see the path is fine - the array shows name, path size and link. SO that's cool. But, how do I dynamically include this data within the <a> tag?

sorry - i'm being a dunce today.
sem 04 Nov, 2014
Answer
I can remove the dunce cap! Yay! Sorted:

THANKS!🙂

<a href={cf_pdf_file}>Click here</a>

as my thanks page and then move the order on submit so TCPDF action happens BEFORE the "display message".

Thanks again for the help Bob.

sem
This topic is locked and no more replies can be posted.