I am using the following to display a list of database records, each with a link to a record edit form, in a Custom Code action within a DB Multi Record Loader action:
This does exactly what I need. However, I would like to make the table sortable on the `co_name` field. I cannot use the "Order fields" item on the Data Displayer tab, because I am not using the standard data displayer. Is there any way I can do this using my existing setup? Or, is there a better way I can be doing this?
<table style="width:98%; margin-bottom:30px;">
<tr valign="bottom" style="border-bottom:2px solid #444444;">
<td style="width:20%;" align="left">Company Name</td>
<td style="width:10%;" align="left">First Name</td>
<td style="width:10%;" align="left">Last Name</td>
<td style="width:10%;" align="left">Account #</td>
<tr>
<?php
foreach($form->data['RegList'] as $detail):
?>
<td><a href="index.php?option=com_chronoforms&chronoform=program_registration_detail&token=<?php echo $detail['cf_id']; ?>" title="Click to Edit"><?php echo $detail['co_name']; ?></a></td>
<td><?php echo $detail['reg_fname']; ?></td>
<td><?php echo $detail['reg_lname']; ?></td>
<td><?php echo $detail['co_account']; ?></td>
</tr>
<?php
endforeach;
?>
</table>
This does exactly what I need. However, I would like to make the table sortable on the `co_name` field. I cannot use the "Order fields" item on the Data Displayer tab, because I am not using the standard data displayer. Is there any way I can do this using my existing setup? Or, is there a better way I can be doing this?