Password control

  • 13 February 2015
  • 6 replies
  • 77 views



 

Symptoms

 


Password control
 

 

Diagnoses

 


How do I set the textbox option to mask the text to appear masked, just like when typing a password? 


 

 

Resolution

The solution to this issue is to insert a data label into the view. In the 'Text' portion of the properties insert the script pasted below.

<script> $('input[name="Text Box"]').get(0).type = 'password' </script>

"Text Box" should equated to the name of the text box is intended to be masked.

 

 



 

6 replies

Badge +2

Tried the above, but the script itself appears in the Password box (as well as randomly elsewhere on the form).  It's not executing.

 

Is there  a setting someplace to read/run Scripts on this control?

 

Thanks!

Badge +5

Hi, when you drop the datafield on your view/form make sure you check the "Literal" checkbox in the properties of the datalabel. This should solve your issue.

Badge +4

It solved my issue.

Great solution, appreciate the help

Great Article.


@K2Support wrote:

Symptoms


Password control

Diagnoses


How do I set the textbox option to mask the text to appear masked, just like when typing a password? 



Resolution

The solution to this issue is to insert a data label into the view. In the 'Text' portion of the properties insert the script pasted below.

<script> $('input[name="Text Box"]').get(0).type = 'password' </script>

"Text Box" should equated to the name of the text box is intended to be maske


 

Badge

Thanks mate. This worked for me. Awesome job.

I've tweaked it slightly by running it when the document has loaded. If the script runs too soon, it will do nothing.


I've split the script out over multiple lines for readability, but you'd want it on one line.

<script>
    $(document).ready(function()  {
        $('input[name="Text Box"]').get(0).type='password';
    });
</script>

Reply