Skip to Content Skip to Menu

Hide/unhide value in a list

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
3 years 1 month ago #326671 by rbuelund
Hide/unhide value in a list was created by rbuelund
I wonder if is possible to have a CB list where a column has a hide/unhide function for the value (as the Joomla password fields), so that the values default are hidden, but by pressing a link/button they are unhidden ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 years 1 month ago #326676 by krileon
Replied by krileon on topic Hide/unhide value in a list
Is there a reason you need to do this? That would typically be considered bad UX causing a user an unnecessary click and removes the capability of doing at-a-glance comparisons on a list. Technically speaking anything is possible, but no this feature does not exist out of the box and would need to be added with custom JS.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
3 years 1 month ago #326680 by rbuelund
Replied by rbuelund on topic Hide/unhide value in a list
Yes - there is a good reason. I need to add username and passwords for a filesserver to a userlist. And when teachers look at the list to help styudents recover their password, they only need to see that one sepcifik users password - also if the student is looking them over the shoulder, they need not to see other students passwords. Theese are children with special needs and we can not send them e-mails, and therefore we this this manual posisbility to recover their password.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 years 1 month ago - 3 years 1 month ago #326681 by krileon
Replied by krileon on topic Hide/unhide value in a list
There's a clever way to do this using some CSS overwise you'll need custom JS to have a blur toggle. The below is an example.

Custom HTML Field:
Code:
<div class="cbClicksInside cbFieldBlur" tabindex="0"> [PASSWORD_FIELD_HERE] </div>
Custom CSS (use CBs built in CSS overrides to add this to CB):
Code:
.cb_template .cbFieldBlur { cursor: pointer; filter: blur(4px); } .cb_template .cbFieldBlur:focus { filter: none; }

Now all you need to do is click the blurred element to reveal it. If the element isn't focused it'll be blurred. Below is how this would look using username as the substituted value. Be sure to replace PASSWORD_FIELD_HERE with whatever your field name is.

Blurred:

Revealed:


The simple CSS trick only works with elements that can be focused, which is why we've set tabindex of 0 to allow it to be focusable. Using an input or textarea element also works. I've also added the "cbClicksInside" CSS class so the userlist will allow clicking without trying to navigate to the users profile.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 3 years 1 month ago by krileon.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum