Skip to main content


 

Symptoms


Textbox control with a password mask
 

Diagnoses


I am designing a SmartForm that has two textbox controls which need to be masked with an asterisk (like password fields) because of the sensitivity of the data to be entered into these fields. How can I do this?
 

Resolution

The password mask is in the works for being part of an up and coming release. However you can still accomplish the mask with Javascript. Place the following code into the name property of a datalable:

andltscriptandgt $('inputpname="txtPassword"]').get(0).type = 'password' andlt/scriptandgt Password Label

Where the textbox you want to have the password mask will be the name="your password box". Test it out and hide this data label when your done.

 




 

I have tried this and it doesnt work. The datalable shows the information being typed into the text box but the characters in the textbox are still clear text


It fixed my issue.

http://community.k2.com/t5/K2-blackpearl/Password-control/tac-p/98103#M5744


FrozenForms wrote:

I have tried this and it doesnt work. The datalable shows the information being typed into the text box but the characters in the textbox are still clear text

In fact original post is valid, or at least I have achieved what I needed by creating form with:

  1. expression containing suggested script 
  2. empty data label with Literal property checked
  3. standard textbox named: “txtPassword”
  4. rule for form initializing event with transfer data action to put expression into empty data label
expression script
resulting password - textbox

Reply