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
i have also tried with
and paper.accepted:paper.accepted on "edit linkable area" show alls rows as linkables
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
paper.accepted:return !empty($row['paper']['accepted']) ? "Edit" : "";
This should work I think!
Regards,
Max
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
Instead of returning "Edit", just return the full link code, you should include the gcb parameter, which should have the pkey value:
Regards,
Max
{model.pkey_field}
Regards,
Max
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.