Hi,
if you want to implement this
download pdf of thank you page just download this example from link, unzip it and install it (joomla backend->Components->Breezingforms->Configuration->Package installer->select this xml file->install package), then you will see the form in Manage forms, inside Package QuickModeForms you will see form with name
pdfdownloadthankyou.
Then you can use the code from form, and implement it in your form
But I will explain too how to add the code in your form:
1) on the last page (if you have checked last page is thank you page)->go to Properties->Page Properties->Intro->click on Edit and add:
<p>Thank you for your submission. Here you can download the summary of your submission as PDF</p>
<div id="pdf_download"> </div>
2) click on form name(your form)->Advanced->More options->Form pieces->After form and add this:
if( JRequest::getInt( 'ff_status', -1 ) == 0 ){
echo '<script type="text/javascript">
<!--
document.getElementById("pdf_download").innerHTML = \'<a href="'.JURI::root(true).'/components/com_breezingforms/exports/'.basename(JFactory::getSession()->get('breezingforms.pdf.download', '')).'">DOWNLOAD PDF</a>\';
//->
</script>';
}
3) go to your form->Advacned->More options->Submit pieces->End submit and add this:
global $ff_compath;
$file = JPATH_SITE . '/administrator/components/com_breezingforms/pdftpl/' . $this->formrow->name . '_pdf_attachment.php';
if (!JFile::exists($file)) {
$file = JPATH_SITE . '/administrator/components/com_breezingforms/pdftpl/pdf_attachment.php';
}
$processed = array();
$xmldata = array();
$_xmldata = $this->xmldata;
foreach ($_xmldata as $data) {
$xmldata[] = $data;
}
ob_start();
require($file);
$c = ob_get_contents();
ob_end_clean();
require_once(JPATH_SITE . '/administrator/components/com_breezingforms/libraries/tcpdf/tcpdf.php');
$pdf = new TCPDF();
$pdf->setPrintHeader(false);
$pdf->AddPage();
$pdf->writeHTML($c);
mt_srand();
$pdfname = $ff_compath . '/exports/download-pdf-' . date('YmdHis') . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
$pdf->lastPage();
$pdf->Output($pdfname, "F");
JFactory::getSession()->set('breezingforms.pdf.download', $pdfname);
If you need more help, let me know
Regards,
Tihana