locked
How to change type of a textfield like password char? RRS feed

  • Question

  • I have an input text field on my custom form. I need to change the type of the this field like password char. when user inputs the charachters on this field , I should show this field like stars * etc. How can I do this?

    Thanks & Regards

    Erdogan Uslu
    Wednesday, September 9, 2009 9:55 PM

Answers

  • I found the solution of my problem, if you need password field property, copy following code and paste to  onLoad function of your form that you need this property.

    crmForm.all.new_password.style.display = "none";

    var pwd = document.createElement("<input type='password'>");
    pwd.value = crmForm.all.new_password.DataValue;
    crmForm.all.new_password_d.appendChild(pwd);
    pwd.onkeyup = function()
    {
        crmForm.all.new_password.DataValue = pwd.value;
    };

    • Marked as answer by erdogan uslu Wednesday, September 9, 2009 10:36 PM
    Wednesday, September 9, 2009 10:35 PM