This topic is locked
[SOLVED]

 Hide Edit icon when a specific value in a field is selected

11/18/2012 12:49:12 AM
PHPRunner General questions
J
jianwong author

Hello
I want to hide the Edit icon of a record on List page after a value "Case closed" from a drop down list of a field is selected. I tried the following Event code on List page Before display, but it won't work. Could anyone please point it out to me if anything wrong with the code? Have I used it in the right place? Thank you.
=============

if ($data["status"]!="Case closed")

{

$record["edit_link"]=false;

}

=============
jian

C
cgphp 11/18/2012

Put the code in the "List page: after record processed" event not in the "Before display" event.

J
jianwong author 11/18/2012



Put the code in the "List page: after record processed" event not in the "Before display" event.


Hello Cristian,
Thank you very much for the pointer.

I placed the event code in "List page: after record processed" as told and replaced "....!="Case closed")" with "... =="Case closed")" now everything is working fine as expected.
jian