Atozed Forums
User/password Autofill - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: User/password Autofill (/thread-28.html)



User/password Autofill - cpstevenc - 03-21-2018

Using Registered Ultimate Intraweb 14.2.7 with Tokyo update 2.

I have a login form, pretty basic deal for a small quick project.

Would like it prompt Browser like Chrome to save user/password for auto fill.

Only 3-4 people will ever be using this program and all will be using Chrome.

I found this but wasn't 100% sure how to implement.


https://stackoverflow.com/questions/5712796/html-login-form-provide-username-autofill-password


RE: User/password Autofill - Alexandre Machado - 03-21-2018

This issue is a little more complicated than it seems.
First, each browser implements its own logic to deal with it and prompt the user to save username/password.

In Firefox and IE you need to put a button with type submit, otherwise it will never prompt for it. In order to do that you can use OnHTMLTag event of a button, to change its type to "submit":


Code:
procedure TIWForm28.LoginHTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
  if SameText(ATag.Tag, 'input') then begin
    ATag.Params.Values['type'] := 'submit';
  end;
end;

However, in my tests WebKit-based browser still fail to prompt even if all requirements are satisfied. I'm running some tests now and should have more info soon. 






[/quote]


RE: User/password Autofill - cpstevenc - 03-21-2018

(03-21-2018, 08:25 AM)Alexandre Machado Wrote: This issue is a little more complicated than it seems.
First, each browser implements its own logic to deal with it and prompt the user to save username/password.

In Firefox and IE you need to put a button with type submit, otherwise it will never prompt for it. In order to do that you can use OnHTMLTag event of a button, to change its type to "submit":


Code:
procedure TIWForm28.LoginHTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
  if SameText(ATag.Tag, 'input') then begin
    ATag.Params.Values['type'] := 'submit';
  end;
end;

However, in my tests WebKit-based browser still fail to prompt even if all requirements are satisfied. I'm running some tests now and should have more info soon. 

Yah after digging a bit into this before I went to bed, it appeared more complicated than I had wished, even with doing things in the "traditional" manor of web development.


RE: User/password Autofill - Jose Nilton Pace - 03-21-2018

(03-21-2018, 03:15 PM)cpstevenc Wrote: Yah after digging a bit into this before I went to bed, it appeared more complicated than I had wished, even with doing things in the "traditional" manor of web development.

Hi, you can try localStorage to do this.
https://www.w3schools.com/html/html5_webstorage.asp


RE: User/password Autofill - davenovo - 03-23-2018

Cant you save a cooke? That way it should work on all browsers, and the users will get the same effect, i.e. they wont have to enter their password to log in...