This topic is locked

readonlye checkbox in inline edit if level not admin

4/29/2011 11:41:03 PM
PHPRunner General questions
I
iyan.dk author

Dear
on tips & trick :
To hide Horsepower field 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. Horsepower edit control will be shown only if username equals "admin".

    $xt->assign("Horsepower_fieldblock",$_SESSION["UserID"]=="admin");
  2. Horsepower edit control will be shown only if current user belongs to the admin group.

    $xt->assign("Horsepower_fieldblock",$_SESSION["AccessLevel"]==ACCESS_LEVEL_ADMINGROUP);
    but this tips not working for inlined edit, user level still can edit the field,

    I need my checkbox field readonly in inline edit/add if the user level isnt admin,

    any help would be highly appreciate
    regards

T
Tempus_Erus 4/30/2011

This should be achievable using the user group permissions?
Change the group permissions accordingly and use the admin group to view and edit all records.
TE