User/password Autofill

<< Click to Display Table of Contents >>

Navigation:  Forum >

User/password Autofill

Forum link

 


 

03-21-2018, 04:41 AM:

 

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/5712...l-password

 


 

03-21-2018, 08:25 AM:

 

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]

 


 

03-21-2018, 03:15 PM:

 

(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.

 


 

03-21-2018, 09:36 PM:

 

(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

 


 

03-23-2018, 03:29 PM:

 

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...