Hi
I have a form, which uses php to display the records I want from a database and this is working well. I added a TCPDF action to the form and copied the code from the form into the TCPDF window, but it doesnt work here - none of the data is being displayed. The table headers are being displayed, so I think the problem is with my method of supplying the data.
I would be very grateful if someone could tell me what I'm doing wrong and how to fix it so it works!
Thanks
I have a form, which uses php to display the records I want from a database and this is working well. I added a TCPDF action to the form and copied the code from the form into the TCPDF window, but it doesnt work here - none of the data is being displayed. The table headers are being displayed, so I think the problem is with my method of supplying the data.
I would be very grateful if someone could tell me what I'm doing wrong and how to fix it so it works!
<table class="table" style="width:100%;font-size:12pt;">
<tr>
<th>Parent first name</th>
<th>Parent last name</th>
<th>Contact1</th>
<th>Phone1</th>
<th>Contact 2</th>
<th>Phone1</th>
<th>Child first name</th>
<th>Child last name</th>
<th>DOB</th>
<th>Medical</th>
<th>Notes</th>
</tr>
<?php
$date=$form->data('camp_date');
foreach($form->data['day'] as $detail):
if (in_array($date, $detail) AND $detail['deleted']!="Yes") {
?>
<tr>
<td>{parent_first_name}</td>
<td><?php echo $detail['parent_last_name']; ?></td>
<td><?php echo $detail['contact1_name']; ?></td>
<td><?php echo $detail['contact1_phone']; ?></td>
<td><?php echo $detail['contact2_name']; ?></td>
<td><?php echo $detail['contact2_phone']; ?></td>
<td><?php echo $detail['child1_first_name']; ?></td>
<td><?php echo $detail['child1_last_name']; ?></td>
<td><?php echo $detail['child1_dob']; ?></td>
<td><?php echo $detail['child1_medical']; ?></td>
<td><?php echo $detail['child1_notes']; ?></td>
</tr>
Thanks