Forums

tcpdf works but can't redirect after

kgriffin 09 Dec, 2020
Hi-

I am successfully generating PDF's using TCPDF, but the form gets stuck once the pdf is generated. It remains grayed out and behaves as if tcpdf is still working to generate the form. I cannot redirect. The only way to get out of it is to refresh the page manually. Is there something I am missing?
Max_admin 11 Dec, 2020
your TCPDF is set to save, download or both ? if download is involved then this is normal, the download option will terminate any future actions!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kgriffin 11 Dec, 2020
Yes, download is involved. How can I expect a user to know the site is not broken and that they have to manually refresh the page to get out of that state? That does not seem to be a very user friendly situation. There has to be a way to break out of this limbo and get the user to an active page, be it the one they are already on or a new one.
Max_admin 12 Dec, 2020
You can just do it the way it's done in most websites:

1- at the form "end_page", redirect "with a delay" to another "standalone" page where you have the TCPDF with the download, that will open the download prompt after the user has landed to the "end_page"

Or

2- add a button in the end_page and setup the link behavior, point the link to the standalone page so that when the user clicks the button, the download starts!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kgriffin 12 Dec, 2020
Answer
Okay. I already had things set up so that the tcpdf was occurring on a separate standalone page, but I was using a submit button instead of a link for some reason and that is what caused the problem.
You need to login to be able to post a reply.