ReadOnly = TRUE not working for modal lookup field (v2022)

v2022.11I have a couple of fields that I’m setting as readonly based on user level.
In the example below,
Field1 is a non-modal select with lookup table
Field2 is a text field with modal lookup
Field3 is a basic select drop-down with no lookup tablein function Row_Rendered() I use the following code:

if (CurrentPageID() == "edit"){
   if (CurrentUserLevel() !='-1'  AND CurrentUserlevel() !='10' AND CurrentUserlevel() !='7'){
      $this->Field1->ReadOnly = TRUE;
      $this->Field2->ReadOnly = TRUE;
      $this->Field3->ReadOnly = TRUE;
   }
}

Result:
Fields 1 and 3 are rendered as readonly, but field 2 (modal lookup) is still editable.Is there a different syntax for making modal lookup fields readonly?

Readonly is only for native HTML input element and textarea, see HTML attribute: readonly. Modal lookup is not a native HTML element. You may try to set the Disabled property instead.

You may also see this following topic: How do you workaround listboxes that are read only - #3 by mobhar