|
To hide controls on Add/Edit pages, based on logged user name,
use the following code in Add
Page: BeforeDisplay and/or Edit
Page: BeforeDisplay event.
Note: Change
the values listed in red to
match your specific needs.
1. To show the
Horsepower field edit
control only if user name equals "admin", use the following
code:
|
$xt->assign("Horsepower_fieldblock",$_SESSION["UserID"]=="admin");
|
2. To show the
Horsepower field edit
control only if current user belongs to the admin group, use the
following code:
|
$xt->assign("Horsepower_fieldblock",$_SESSION["AccessLevel"]==
ACCESS_LEVEL_ADMINGROUP);
|
More info about
PHPRunner Session variables.
|