Password field

Workarounds and usability notes.

Password field

Postby John Robin Dove » Thu Apr 15, 2021 6:18 am

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
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am

Re: Password field

Postby Clifton » Thu Apr 15, 2021 8:07 am

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.
 
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Password field

Postby John Robin Dove » Thu Apr 15, 2021 8:20 am

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?
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron