Use different/multiple forms to edit?

megana 16 May, 2015
I have multiple forms that all feed into the same database table, so I was able to easily set up CCv5 to display a list of all the data. My problem is editing...I'm saving the form name and ID in the database so it KNOWS which form was used to create the entry, but is there a way to set up CC so that when you try to edit an entry, it will load the correct form for editing?
GreyHead 18 May, 2015
Hi megana,

You can set up a custom edit link that goes to the correct form using $row->form_name from the data you have.

Bob
megana 19 May, 2015
Hi Bob, can you give me an example? I don't see where the form name is used in the edit link. My edit links look like http://www.domain.com/component/chronoconnectivity5/?cont=lists&ccname=ads&act=edit&gcb=22 Thanks!
GreyHead 19 May, 2015
Hi megana,

It would be a custom link using something like
<a href='http://www.domain.com/index.php?option=com_chronoforms5&chronoform=<?php echo $row->form_name; ?>&gcb=<?php echo $row->id; ?>' >[ Edit]</a>
I'm not sure what the actual values would be in the PHP bits - depends on your listing.

Bob
megana 19 May, 2015
Thanks Bob! I think I can figure it out from here.
megana 19 May, 2015
Well maybe not...the edit links do show the correct form now, but they no longer populate with the previously entered info. I turned on the debugger and it looks like it's not doing anything with the id/gcb anymore. I guess I could use a DB Read to load the info again, but is there a better way?
GreyHead 19 May, 2015
Hi megana,

I don't think so - use the DB Read.

There may be a neater way to connect but, if there is, I don't know what it it :-(

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