0? $cell ); i have also tried withpaper.accepted:return ($row['paper']['acepto'] >0? cc_edit_data&chronoconnection=ver_paper_list&cb={paper.id}return={return} );and paper.accepted:paper.accepted on "edit linkable area" show alls rows as linkables"> Conditional Edit action on CCv5 - Forums

Forums

Conditional Edit action on CCv5

teldrive 05 Jun, 2014
I am a little confused with CCv5 settings (link, edit, HTML, fields) i'm trying to set a conditional link to edit action

i have one field, and I would like it allow edit or not the record depending of its value
paper.acepted is binary can be "0" or "1"

the issue is how can get related with edit function
following code only (i think) must be set only on "php area code" and it shows or not the field but i can't relate to edit action

paper.accepted:return ($row['paper']['accepted'] >0? $cell ); 

i have also tried with
paper.accepted:return ($row['paper']['acepto'] >0? cc_edit_data&chronoconnection=ver_paper_list&cb={paper.id}return={return} );


and paper.accepted:paper.accepted on "edit linkable area" show alls rows as linkables
Max_admin 06 Jun, 2014
paper.accepted:return !empty($row['paper']['accepted']) ? "Edit" : "";


This should work I think!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
teldrive 07 Jun, 2014
Hi Max thanks by reply, yes it writes or not "Edit" in cell, the issue is how can convert this "Edit" in link to edit action
Max_admin 13 Jun, 2014
Answer
Instead of returning "Edit", just return the full link code, you should include the gcb parameter, which should have the pkey value:
{model.pkey_field}


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
teldrive 14 Jun, 2014
Thanks Max😉 it Works
paper.accepted:return !empty($row['paper']['accepted']) ? "<a href='http://midomain/component/chronoconnectivity5/?cont=lists&ccname=ver_paper_list&act=edit&gcb={paper.id}'>Editar</a>"  : "";
This topic is locked and no more replies can be posted.