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.

mask the text field
#1
greetings companions

Do you have any other method to mask the text field with asterisks in Mozilla Firefox? It works in Chrome with the following style, but it does not work in Firefox.


-webkit-text-security: disco;
Reply
#2
There's no compatible property in Firefox. If you use "show control" mode then you can change input type to password via Custom JS.
Reply
#3
buenos dias admin

Traté de seguir los pasos pero arrojo este error

Attached Files Thumbnail(s)
   
Reply
#4
Can you post a screenshot with how your current visualization looks like and which field value you want to hide?
Reply
#5
son una cadena de caracteres de 255 bytes

Attached Files Thumbnail(s)
   
Reply
#6
Can you send backup from your device via PM or via email?
Reply
#7
Use this Custom JavaScript. It will switch input type to password if your object element has password class and revert to text otherwise.
Code:
$(function(){
  var _preConfigureControl = preConfigureControl;

  preConfigureControl = function(widget, el, type, main) {
    if (type == 'textinput') {
      var password = widget.el.hasClass('password');
      el.find('input').attr('type', password ? 'password' : 'text');
    }

    return _preConfigureControl(widget, el, type, main);
  }
});
Reply
#8
(14.11.2019, 08:12)admin Wrote: Use this Custom JavaScript. It will switch input type to password if your object element has password class and revert to text otherwise.
Code:
$(function(){
  var _preConfigureControl = preConfigureControl;

  preConfigureControl = function(widget, el, type, main) {
    if (type == 'textinput') {
      var password = widget.el.hasClass('password');
      el.find('input').attr('type', password ? 'password' : 'text');
    }

    return _preConfigureControl(widget, el, type, main);
  }
});


It seems that it doesn't work using "Inline in Usermode" on a 250 byte string input box... Is it possible?
I need to mask the input of a password value stored inside a 250 byte string address.
Is there any way to do it?
Thanks

Thanks.
Reply
#9
Set Additional class to text-password, add this to Custom JavaScript:
Code:
$(function(){
  $('.text-password input').attr('type', 'password');
});
Reply
#10
(29.07.2021, 13:44)admin Wrote: Set Additional class to text-password, add this to Custom JavaScript:
Code:
$(function(){
  $('.text-password input').attr('type', 'password');
});

Ok, it works! Thanks!

And how can I do it if the input is not in Inline? I mean to mask both the input field and the visualitzation value
Reply
#11
Masking the value is rather complicated. It can be done easier via CSS but the number of "*" will be fixed. Set Additional class to password and use Custom JavaScript from here: https://forum.logicmachine.net/showthrea...8#pid14688

Custom CSS:
Code:
.password .value {
  color: transparent;
  position: relative;
}

.password .value:after {
  color: #333;
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  content: "*****";
}
Reply
#12
(30.07.2021, 07:33)admin Wrote: Masking the value is rather complicated. It can be done easier via CSS but the number of "*" will be fixed. Set Additional class to password and use Custom JavaScript from here: https://forum.logicmachine.net/showthrea...8#pid14688

Custom CSS:
Code:
.password .value {
  color: transparent;
  position: relative;
}

.password .value:after {
  color: #333;
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  content: "*****";
}

Ok thanks!
Reply


Forum Jump: