This topic is locked

Conditionally hide / hiding check box on List Page

5/5/2020 12:46:17 AM
PHPRunner General questions
M
MikeB941 author

phprunner 10.3 - build 34624
I've tried using $record["checkbox"] = false within an if statement in the List page: After record processed event but the checkbox still appears (I've verified that $record["checkbox"] has been set to false by echoing the value).
Is there a new method to conditionally (on a row/record by row/record basis) hide or not hide the checkbox on the List page?
Many thanks -

Sergey Kornilov admin 5/5/2020

We do not have an API for this purpose but you can do this manually using jQuery. For instance, here is the Javascript code that hides the checkbox for one of records:

$("input[id=check1_8]").hide();


"8" here is a RecordID which is the part of GridRow API. Here are useful links:
https://xlinesoft.com/phprunner/docs/getallrecords().htm

https://xlinesoft.com/phprunner/docs/row_recordid().htm

W
wpl 5/6/2020



phprunner 10.3 - build 34624
I've tried using $record["checkbox"] = false within an if statement in the List page: After record processed event but the checkbox still appears (I've verified that $record["checkbox"] has been set to false by echoing the value).
Is there a new method to conditionally (on a row/record by row/record basis) hide or not hide the checkbox on the List page?
Many thanks -



Mike,
I just gave it as try: it works in pre-10 releases of PHPRunner. Though



$record["edit_link"] = false;

$record["view_link"] = false;


will still work in the latest release of version 10.4. And changing



$record["checkbox_attrs"]


also works as expected. Any ideas how to restore this functionality?