Hello, I am currently making a free website for a junior sports club and am having a small problem.
On the Joomla website is a form Module Breezing Forms which collects the data from the form and stores it in the database. In the Breezing Forms component you have the option to export the data in PDF format which is ideal as the secretary will need signatures on them once printed.
Currently the form is very ugly when converted to PDF so I decided to customize it.
The current file export_pdf.php has a few scripts within it that pull ALL the data from the database and insert it into a table leaving you have no option to customize it.
Below is the script:
<?php
$subs = $this->getSubrecords($rec->id);
$subsSize = count($subs);
for($s = 0; $s < $subsSize; $s++) {
$sub = $subs[$s];
?>
<tr>
<td>
<strong><?php echo htmlentities($sub->title, ENT_QUOTES, 'UTF-8'); ?>:</strong>
</td>
<td>
<?php echo nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8')); ?>
</td>
</tr>
The script recommended by Breezing Forms which allows you to customize the output is:
<?php
$name = '';
$email = '';
$subs = $this->getSubrecords($rec->id);
$subsSize = count($subs);
for($s = 0; $s < $subsSize; $s++) {
$sub = $subs[$s];
switch($sub->name){
case 'name':
$name = nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8'));
break;
case 'email':
$email = nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8'));
break;
}
}
?>
<tr>
<td>
<strong>Name:</strong>
</td>
<td>
<?php echo $name; ?>
</td>
</tr>
<tr>
<td>
<strong>Email:</strong>
</td>
<td>
<?php echo $email; ?>
</td>
</tr>
The problem is this script does not display any data, how would I link the form data to the pdf output php?
Thank you very much if you read this far, any help is very much appreciated!!