Skip to main content
Solved

Hide lookup popup button in read mode


Arjan Sollie
Thinkwise blogger
Forum|alt.badge.img+14

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?

Best answer by Mark Jongeling

Arjan Sollie wrote:

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:

View original
Did this topic help you find an answer to your question?

4 replies

htimmermans
Captain
Forum|alt.badge.img+12
  • Captain
  • 61 replies
  • October 21, 2021

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)

 


Arjan Sollie
Thinkwise blogger
Forum|alt.badge.img+14
  • Author
  • Thinkwise blogger
  • 85 replies
  • October 21, 2021

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


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • October 21, 2021
Arjan Sollie wrote:

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:


Jasper
Superhero
  • 678 replies
  • November 9, 2021

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings