This topic is locked
[SOLVED]

 Allow edit only if field data equals to a value

11/4/2010 3:47:38 PM
PHPRunner General questions
A
almeida author

I want to create a restriction to allow the user edit a record only if a field has a value = true.

Is there a way to?

The restriction is only by the field value not user rights.
Thanks

E
electromotive 11/5/2010

This a relatively common requirement.
Let's say you had a binary field in your record called "LockIt".

In the List Page: After Record Processed event, add the following snippet:
if ($data["LockIt"]==1)

{

$record["edit_link"] = false;

}

A
almeida author 11/5/2010



This a relatively common requirement.
Let's say you had a binary field in your record called "LockIt".

In the List Page: After Record Processed event, add the following snippet:
if ($data["LockIt"]==1)

{

$record["edit_link"] = false;

}


Thanks!