Forums

How do I display multirecords?

rkloots 18 Apr, 2012
Hi,
As a devtest result I have a warning:

Invalid argument supplied for foreach() in /../joomla/administrator/components/com_chronoforms/form_actions/db_multi_record_loader/cfaction_db_multi_record_loader.php on line 74


What went wrong?

Situation:Chronoformv4 & Joomla 1.5

When using DB multi Record loader in Customcode The following is entered
<b>Show:</b><p>
<table>
<?php
foreach($form->data['List_table'] as $detail);
?>
<tr>
<td>Kopen/huren<?php echo $detail['transactionValue']; ?></td>
<td>Pand type:<?php echo $detail['typevalue']; ?></td>
<td>City:<?php echo $detail['cityValue']; ?></td>
<td>Price:<?php echo $detail['price']; ?></td>
<td><a href="index.php?option=com_chronoforms&chronoform=List_table&
token=<?php echo $detail['fortissimmo']; ?>">View</a></td>
</tr>
<?php
endforeach
?>
</table>
GreyHead 19 Apr, 2012
Hi rkloots,

It looks as though the error message is because the DB Multi-Recoerd Loader isn't finding any data maybe because there is something wrong with the configuration.

In your code I think that the foreach line needs a colon : at the end, not a semi-colon ;

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