Forums

Multi Record Loader Table missing the 'edit' column

Laus 27 Jan, 2012
I have followed instructions of the CFV4_db_multi_record_loader.pdf

But although I am getting a results table, there is no edit function. Does this code work with J!1.7 or is there any difference between code required for Joomla versions.

The code I am using is:
<table>
<td>Name<td><td>Business<td><td>Email<td><td>County<td><td>Edit<td>
<?php
foreach($form->data['MysteryShopperDetails'] as $detail):
?>
<tr>
<td><?php echo $detail['contact_name']; ?><td>
<td><?php echo $detail['business']; ?><td>
<td><?php echo $detail['email']; ?><td>
<td><?php echo $detail['county']; ?><td>
<td><a href="index.php?option=com_chronoforms&chronoform=mysteryshop_single_loader&token=<?php echo $detail['cf_uid']; ?>Edit</a></td>
</tr>
<?php
endforeach;
?>
</table>


Could anyone advise me where I might be going wrong - I have followed tutorials and checked my steps several times?

Site not published yet, so can't show a link, but can supply access.

Thanks in advance.
GreyHead 30 Jan, 2012
Hi Laus,

This looks OK to me. What exactly doesn't work? I don't think that there are any significant changes in 1.7 that would affect this.

Bob
partic 16 Feb, 2012
Laus,

Was just making the same mistake a a few minutes ago myself.

The problem you have is with the closing of the " in your href.

<a href="index.php?option=com_chronoforms&chronoform=mysteryshop_single_loader&token=<?php echo $detail['cf_uid']; ?>Edit</a>


should be

<a href="index.php?option=com_chronoforms&chronoform=mysteryshop_single_loader&token=<?php echo $detail['cf_uid']; ?>">Edit</a>


Where the "> before the Edit was missing.

Patrick
GreyHead 16 Feb, 2012
Hi Lartic,

Well found - I missed that completly.

I tend to write code like this inside the <?php tags to keep it cleaner. But that is a question of personal preference:
foreach ( $form->data['MysteryShopperDetails'] as $d ) {
  echo "<tr>
<td>{$d['contact_name']}<td>
<td>{$d['business']}<td>
<td>{$d['email']}<td>
<td>{$d['county']}<td>
<td><a href='index.php?option=com_chronoforms&chronoform=mysteryshop_single_loader&token={$d['cf_uid']}' >Edit</a></td>
</tr>";
}
?>

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