This topic is locked
[SOLVED]

 Selective Hiding Chcekboxes in V10

1/21/2019 3:01:01 PM
PHPRunner General questions
T
thamestrader author

As I have just spent 18 hours trying to figure out why the following code, to selectively hide a checkbox according to a data value, which worked perfectly in v9.6 and v9.8 didn't work in v10 - I thought it might be useful to others.
In v961 I had:
$record["checkbox"] = false;

if ($data["status_code"] == "IS") {

$record["checkbox"] = true;

}
I don't know where or how I came up with that code originally to selectively hide a checkbox on a list page. It might have been based/inspired by Events/List Page/After record processed - Hide buttons. I eventually found this example again and it gave me the clue I needed to fix my code.
In v10 I found that the BEGIN/END wrapper had a different name..

this code then worked perfectly.

$record["checkbox_column"] = false;

if ($data["status_code"] == "IS") {

$record["checkbox_column"] = true;

}