Hi Jane, thanks for your reply. i have copied the answer here for the sake of discussion. I need to check the value of current edited record,
and apply the hide method. The method mentioned below
is to use the Session variable $_SESSION["UserID"]=="admin". Would it be something like $data["field1"] for current record? i.e. $xt->assign("Horsepower_fieldblock",$data["field1"] == 1); Many thanks
acpan
PHPRunner 4.2
This is a two step process
1. Proceed to the Edit page, switch to HTML mode and wrap the code section with wrappers (in bold) as shown below:
{/if} 2. Now you need to implement BeforeShowEdit event and put the following code there:
$smarty->assign("admin_user", $_SESSION["UserID"]=="admin"); Horsepower edit box will be shown only if username equals "admin". PHPRunner 5.0 To hide Horsepower field add BeforeShowEdit event on the Events tab and put the following code there: Quote
$xt->assign("Horsepower_fieldblock",$_SESSION["UserID"]=="admin"); Horsepower edit box will be shown only if username equals "admin".