Skip to main content

Is it possible to hide the lookup popup button when you are in read mode and display it when you are in add/edit mode?

And is this also available in the Universal UI?

Hi Arjan, long time no see :wink:

Not sure if I understand the problem (is the field in a form or in a grid), but would this work:

  • Add another field with the same value (if it is a view, otherwise an expression field and have it available in layout procedures)
  • Use the same lookup information, but disable “Lookup has popup”
  • Hide the field when navigating and only show it using the layout procedure when adding/editing
  • Only show the new field in the grid (if the grid is editable)

 


@htimmermans ,

I was wondering if there was like a general setting for disabling lookup buttons when a user is not in edit mode. If there isn't a setting for this, that is also an answer. I am just not sure whether such a thing exists or not.


I was wondering if there was like a general setting for disabling lookup buttons when a user is not in edit mode. If there isn't a setting for this, that is also an answer. I am just not sure whether such a thing exists or not.

Such option does not exist currently but I do like the Idea :wink:


This can actually be done using CSS!

Add the code below to the custom.css file to only show the lookup buttons on hover over the form or when in edit mode (only for devices that support hovering).

@media (hover: hover) {

.MuiPaper-root .lookup-popup-button {
visibility: hidden;
}

.MuiPaper-root:hover .lookup-popup-button {
visibility: visible;
}

.MuiPaper-root .edit-mode .lookup-popup-button {
visibility: visible;
}

}

 


Reply