Solved

Hide lookup popup button in read mode

  • 19 October 2021
  • 4 replies
  • 90 views

Userlevel 4
Badge +13

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?

icon

Best answer by Mark Jongeling 21 October 2021, 17:09

View original

4 replies

Userlevel 2
Badge +12

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)

 

Userlevel 4
Badge +13

@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.

Userlevel 7
Badge +23

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:

Userlevel 7
Badge +11

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