Forums

Chronoforms & TCPDF

Chast 25 Aug, 2013
Dear GreyHead.
My name is Lorenzo and I'm an Italian developer. A few days ago I asked Max to send the action TCPDF. Today I received by e-mail. Now I followed the instructions from here: http://www.chronoengine.com/faqs/4133-how-can-i-create-a-pdf-including-form-results-.html. My big problem is that the variables of the module {exemple} are not loaded in the pdf. Use the version 4 of Joomla 2.5.x. Only content created in html are reported in pdf but again, not genrate the variables from the module.
Any suggestions?
Thank you.

lorenzo
GreyHead 25 Aug, 2013
Hi Lorenzo,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

Please also post the code you have in the PDF action.

Bob
Chast 25 Aug, 2013
I followed your advice and I followed your advice but the variables are not included in the PDF. I attach the action on:

<table cellpadding="5" cellspacing="5" border="0">
	<tr>
		<td colspan='2'>
			<h1>Invia Richiesta Online</h1>
		</td>
	</tr>
	<tr>
		<td>
			<strong>Nome utente:</strong>
		</td>
		<td>
			{nome}
		</td>
	</tr>
	<tr>
		<td>
			<strong>Email utente:</strong>
		</td>
		<td>
			{email}
		</td>
	</tr>
	<tr>
		<td>
			<strong>Ruolo scolastico:</strong>
		</td>
		<td>
			{ruolo}
		</td>
	</tr>
	<tr>
		<td>
			<strong>Tipologia richiesta:</strong>
		</td>
		<td>
			{tipologia}
		</td>
	</tr>
	<tr>
		<td>
			<strong>Modulo PDF</strong>
		</td>
		<td>
			{modulo}
		</td>
	</tr>
</table>


I'm sure you were wrong and I think I get confused between advice for version 3 and version 4.
Really thank you for your help!

Lorenzo
GreyHead 25 Aug, 2013
Hi lorenzo,

Please submit the form and post the debug results here.

Bob
Chast 25 Aug, 2013
With debug mean the PDF file produced by the action TCPDF? Here is the file that contains the text in my html but not the variable of the modules:
GreyHead 25 Aug, 2013
Hi Lorenzo,

No that wasn't what I meant. Perhaps you have the PDF action set to immediate download so you don't see any debug output. Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
Chast 25 Aug, 2013
Forgive me! Now I understand!
Here's the backup:
GreyHead 25 Aug, 2013
Hi Lorenzo,

I got it to work OK with a few tweaks.

a) You can't set input values the way you have with name='cfu_email'; the simplest way is to change the name of the input to match the data source e.g. cfu_email. Otherwise you can use a Custom Code action to copy the value:
<?php
$form->data['email'] = $form->data['cfu_email'];
?>

b) You can remove the Show HTML action from the On Submit event; it doesn't do anything there.

c) Change the Mode of the TCPDF action from View to Controller - I think that this is the main change required.

d) There seems to be an PHP warning from the TCPDF action which I think is related to the colspan setting in the table. Try switching this to use double quotes colspan="2".

Bob
Chast 25 Aug, 2013
I do not understand the point A.
I have put the code name = 'cfu_name' and name = 'cfu_email' to follow the instructions of the "Load user info".
In which part should I replace name = 'cfu_email' with cfu_email?
The php code it yourself past where I should enter?
Forgive me for all these questions but I get lost.

lorenzo
Chast 25 Aug, 2013
Got it!
Now it works fine, just do not understand, the php code. To tell the truth I have not served, but where would I enter it? These modules will have to be more complex, with more variables. If I needed I can contact you by this board, of course I'll buy you a beer and a coffee ......
Thanks for everything if you really kind!

lorenzo
Chast 25 Aug, 2013
Sending email has been rehabilitated, but does not work now, before everything was ok and sending worked fine!
There is always something wrong!

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