This topic is locked

Checkbox for edit locking

8/11/2009 8:48:27 AM
PHPRunner General questions
S
sickacid author

I want lo lock edit function in the list with a check box, i think to do an update query in mysql for

set 1 value in the table form 01-01-09 to yesterday (for example). (i'll do this query montly)

and only the line whit have the 0 value can be edited from list page.
date value chkbox

01.01.09 1 can't be edited from list page

10.08.09 1 can't be edited from list page

12.08.09 0 can be edited in list page
what can i do ? =)

J
Jane 8/11/2009

Hi,
you can check date field in the List page: After record processed event and show or hide edit link if needed.

Here is a sample:

if ((strtotime("now")-strtotime($data["FieldName"]))/(606024)>0 )

$record["edit_link"] = false;

S
sickacid author 8/11/2009

Hi,

you can check date field in the List page: After record processed event and show or hide edit link if needed.

Here is a sample:


i've do

//** Custom code ****

// put your custom code here
global $record;

if ($data["Lock"])

{

$record["edit_link"] = false;

}
and that's work

but for lock the inline edit link? what can i do?

J
Jane 8/12/2009

Hi,
please see my changes below:

global $record;

if ($data["Lock"])

{

$record["inlineedit_link"] = false;

}