hide extended search field from a user level

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
vintoICT
User
Posts: 408

hide extended search field from a user level

Post by vintoICT »

I have some search fileds but i don't want a user level to see the field in search area. but other user levels can . and the prevented user level can see the remaining search fields eaxcept the particular one i intend to hide


mobhar
User
Posts: 11732

Post by mobhar »

You may simply use Page_Load server event that belongs to the List Page, for example:

if (CurrentUserLevel() == 1) {
    $this->FieldA->Visible = false;
    $this->FieldB->Visible = false;
}

This will hide the field from Extended Search. However, it will also hide the field/column from the Table in the List Page. If you don't want to hide it also from the Table, then you need to put the following code also in Page_DataRendering server event of the List Page:

if (CurrentUserLevel() == 1) {
    $this->FieldA->Visible = true;
    $this->FieldB->Visible = true;
}

Post Reply