Page 1 of 1

Password field

PostPosted: Thu Apr 15, 2021 6:18 am
by John Robin Dove
Hi Clifton,

Two problems: I cannot create a password field and also I would like the browser to prompt to save the userName and password. Neither seems possible at the moment.

I have used userProperty to create password fields in other parts of the program. What's wrong here?

I also remember browsers prompting to save a password in other programs I have made in the past but I can't remember exactly how they functioned. I think creating a password input is a critical factor. I have put a zip here https://www.mediacours.com/tb_examples/login.zip
containing login.tbk, login1.xml and entry.txt. In a final version I would try to make the password more difficult to find but I'm not at that stage yet. The school code is ARG1-1 and the password is mB4tUvx3.

I would be grateful for your help.
John

Re: Password field

PostPosted: Thu Apr 15, 2021 8:07 am
by Clifton
Hi John,
Create an editable field; single line (no word wrap).
Then in your XML code for a field named "myPassword":
<myPassword>
<userProperty>
{ prop : "type",
value : "password",
getSet : "set" }
</userProperty>
</myPassword


You can dynamically remove the property to reveal passwords if you want add this feature for user preference.
<myPassword>
<userProperty>
{ prop : "type",
value : "text",
getSet : "set" }
</userProperty>
</myPassword


I'll look at your zip file later and see what is going on with it.
Browsers will generally ask to save passwords when the browser detects that the field is valid password field. If the input type is not "password" the browser will never ask to save the password.
 

Re: Password field

PostPosted: Thu Apr 15, 2021 8:20 am
by John Robin Dove
Many thanks. I forgot the single-line requirement. The browser didn't ask to save the password. Maybe because I was testing with your preview system?

UPDATE
I've put it on my site but the browsers are still not asking if the password should be saved. Should I maybe include a form or something like that?