This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Add elements in Mosaic widget
#1
Hello,

In a mosaic widget it is possible to add standard elements as calendar, time and value with "Add Elements"
All these have both Main objects and Value objects.
I need to display some dates, times, values as readonly without the possibility for the user to change these.

   
   

Any suggestions how this can be done?
Reply
#2
Can be done via Custom CSS in Setting & Themes:
Code:
#u-352daf4e75651dd160ec9aed807ccf02 div[data-index="2"] .datetime {
  pointer-events: none;
}

Use browser dev tools (F12) to find out custom widget ID and index of the element that you want to make read-only:
   
Reply
#3
Thanks,

I cant figure out how to find this info
When I press F12 this window appear:

   
Reply
#4
You can also right click the date/time element and select "Inspect".
Reply
#5
(21.09.2022, 13:16)admin Wrote: You can also right click the date/time element and select "Inspect".

I have tried this, but nothing changes.
I can still change the date and time

#u-f1ad2fa3ea31330884f63f4bd792f777 div[data-index="10"] .datetime {
  pointer-events: none;
}

   

   

Thanks
Reply
#6
There's an issue when you copy/paste from forum code blocks to Mosaic Custom CSS. Code block uses different space character which looks the same as a normal space. But this CSS rule does not work. Try manually replacing spaces in Custom CSS and see if it works.
Reply
#7
Thank you
Now it works

Would it be possible to add an read-only option in element settings?  Would have been great..
Not only for this element type but also others that sometimes only is used for showing the value.


Carl
Reply


Forum Jump: