Page 1 of 1

How to hide password text?

Posted: Tue Aug 10, 2010 3:21 pm
by scott47303
I cannot figure out how to do it. I want * to display when the user types in the field, how do you do this?

Thanks.

Re: How to hide password text?

Posted: Tue Aug 10, 2010 3:35 pm
by Klaus
Hi Scott,

its all buit in :-)
...
ask password clear "Please enter password:"
if it <> empty then
## IT contains the password that the user entered
## and you can now check it
## If the user hit "cancel" the variable IT will be empty!
end if
...

Best

Klaus

Re: How to hide password text?

Posted: Tue Aug 10, 2010 4:44 pm
by Mark
Hi scott47303,

If you would like to make your own password field, here's a widget for you. The stack is called "Password Field". Scroll down to 1/3rd of the page.

Best,

Mark

Re: How to hide password text?

Posted: Tue Aug 10, 2010 5:14 pm
by scott47303
Mark, that is exactly what I was looking for, thanks! Wow, thats alot of code for something that sounds simple.

Re: How to hide password text?

Posted: Tue Aug 10, 2010 5:24 pm
by Klaus
Hi Scott,

sorry I overlooked "... when the user types into a field".
So Marks widget is the way to go.

And yes, lots of scripting involved :)


Best

Klaus

Re: How to hide password text?

Posted: Tue Aug 10, 2010 10:32 pm
by Curry
If password text is hidden when creating a new one, it's a good idea to enter twice and compare the two. It's too easy to make a small mistake and never notice.

Re: How to hide password text?

Posted: Tue Aug 10, 2010 10:48 pm
by Mark
Hi Curry,

That only applies if the password field is used for changing or creating a (new) password. If the field is only used to give access to a protected part of a stack, then one password field should be sufficient.

My widget could be added to a card twice, without any problem. The userpassword properties of the two fields could be compared to test the validity of a new password.

Best regards,

Mark

Re: How to hide password text?

Posted: Tue Aug 10, 2010 11:37 pm
by Curry
That's right, only twice when creating a new one!

Re: How to hide password text?

Posted: Mon Apr 11, 2011 8:53 am
by QuangNgo
Hi mark

That is a lot of code for simple thing. In the visual studio this problem is quite easy.So sorry to say that.
So is there any other solution to do that?.

Quang

Re: How to hide password text?

Posted: Mon Apr 11, 2011 10:10 am
by Mark
Hi Quang,

There are simpler solutions, but those are less secure or less flexible and you'd still have to add a lot of code to fix that. I'm not saying that my solution is perfect, it could still be improved, but that would require the addition of even more code :wink:

Kind regards,

Mark