3

Can any one suggest to build a password field that behaves the way passwords are entered using iphone?

When I enter some character, it should be visible to the user for a second and then it should turn to *. But I need to get the value from the field when I submit the form.

Its an ExtJs text field. Is there any plugins available for this? Any help on this will be helpful.

hop
  • 2,518
  • 11
  • 40
  • 56

2 Answers2

3

Check out this Fiddle

Change textfield to stars like iPhone

Note: this solution is NOT complete and NOT optimal, for example you will have to handle Delete and Backspace buttons manually. You might find some plugin to do it in other way, but this is the simplest way to do it JavaScript I guess.

mohdajami
  • 9,604
  • 3
  • 32
  • 53
  • This helps, But, is there any solution to avoid using the hidden field. I mean some thing like only the style changes and the actual value is retained. – hop Sep 05 '11 at 08:01
  • 1
    Check this question http://stackoverflow.com/questions/3574474/change-text-to-dots-in-text-field-with-css-javascript, apparently someone tried before and it's not doable with CSS. Even the jQuery solution is using a hidden field. – mohdajami Sep 05 '11 at 08:14
3

Probably, this can help you:

http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/

James Jithin
  • 10,183
  • 5
  • 36
  • 51
  • Now the link works. Good job. I was trying a similar thing with JS and guess what even I am facing the same problem of editing in the middle! This really helps and is well written – hop Sep 14 '11 at 04:04