Forums

Problem with tutorial?

tshirley 30 Apr, 2012
Hello,

I have just installed Chronoforms V4 and I have been following the tutorial on how to list multiple rows and edit data.

All went perfectly and I set up custom code in the List Form as follows:
<table>
<?php
foreach($form->data['SelectPilot'] as $detail):
?>

<tr>
<td>Name:<?php echo $detail['First_Name_1'];
               echo ' ';
               echo $detail['Last_Name_1']; ?></td>
<td><a href="index.php?option=com.chronoforms&chronoform=Edit_Form_4&token=<?php echo $detail['cf_uid']; ?>">Edit</a></td>
</tr>
<?php
endforeach;
?>
</table>


The form Edit_Form_4 exists and works, but when I use this code in the Listing Form and click Edit I get error 404.

I'm not an expert in php, just following the cookbook. All forms are published, it all seems to work, except for the 404.

Can anyone help?

Thanks

Tim
GreyHead 30 Apr, 2012
Hi Tim,

I think that option=com.chronoforms should be option=com_chronoforms

Bob
tshirley 30 Apr, 2012
Yes indeed - my mistake!

So I changed the code as you suggested and now a blank edit form appears after I select one of the records and click the Edit token.

I have placed a hidden field in the edit form with field name cf_id. Then I noticed in the above code, the tutorial suggests $detail['cf_uid'] - but there is no such field in the table so I tried changing to $detail['cf_id']...

but the same result, a blank form.

Happy to buy beer if I can get out of this one...

Cheers

Tim
GreyHead 30 Apr, 2012
Hi Tim,

I think that it needs to a be a column in the table, does cf_id exist in the Select_pilot array?

Bob
tshirley 30 Apr, 2012
Thanks Bob,

Yes in the DB Loader I didn't name the fields (so I assume the whole table was selected) and the table has a cf_id field, and also a 'uid' field.

Cheers

Tim
tshirley 01 May, 2012
OK, problem now resolved with a little more research.

Thank you.

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