This topic is locked
[SOLVED]

 Lock edit page

9/18/2017 2:09:48 AM
PHPRunner General questions
H
headingwest author

Is there any way to lock the edit page of some records. So if id=1 then lock all edit fields.
I was hoping to use the record locking feature that's with the audit trail settings.

romaldus 9/18/2017



Is there any way to lock the edit page of some records. So if id=1 then lock all edit fields.
I was hoping to use the record locking feature that's with the audit trail settings.



https://xlinesoft.com/phprunner/docs/disable_record_editing.htm

H
headingwest author 9/18/2017

Thanks Romaldus. I've done that but I also have the "Click actions" for the grid set to edit the record which bypasses the edit icon.
I was hoping the $pageobject or similar would have a lock method.

jadachDevClub member 9/18/2017

Perhaps using javascript.

Create a proxy value using some logic on before display. Then use that proxy value to determine if all fields will be read only.

romaldus 9/18/2017



Thanks Romaldus. I've done that but I also have the "Click actions" for the grid set to edit the record which bypasses the edit icon.
I was hoping the $pageobject or similar would have a lock method.


No Problem. Go To Events > Your Table Name > Is Record Editable
Use the following code to disable edit. This code also disable edit from click actions:



if ($values["id"] == '1')
return false;
else
return true;
//return $isEditable; is default from phprunner

return $isEditable;
H
headingwest author 9/18/2017

Thanks Romaldus - perfect!

romaldus 9/18/2017