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.

Switch widget with 0 value
#1
Hello

I was migrating a project to the new view, and I have a small problem. I need to set an object representation that is tied to a bit. If the bit is at 0, I shouldn't see anything; if the bit is at 1, I should see a colored rectangle. The problem is that when I use the switch widget with the value at 0, it turns blue as if it were active. It's a read-only object.

What am I doing wrong?

Thanks
Reply
#2
1. Set Additional CSS classes to hide-when-false
2. Add to Custom CSS:
Code:
.user-view .hide-when-false[data-value=false] {
  display: none;
}

This will completely hide the widget in user view when the value is false.
Reply
#3
(Yesterday, 12:15)admin Wrote: 1. Set Additional CSS classes to hide-when-false
2. Add to Custom CSS:
Code:
.user-view .hide-when-false[data-value=false] {
  display: none;
}

This will completely hide the widget in user view when the value is false.

ok I add this code in custom CSS, for use this code need to wirte in appearance in additional CSS   hide-when-false  ?

Thanks
Reply
#4
Yes the additinal classes are added in widget apperance on the bottom.
------------------------------
Ctrl+F5
Reply


Forum Jump: