MarkLince Posted March 17, 2017 Share Posted March 17, 2017 Hi, Is there anyway to prevent the browser from prompting to save the password? I have a login and it has a limited time cookie set for say 1-2 hours and that's all I want. How do I prevent the browser from prompting the user to save credentials? Thanks Mark Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2017 Share Posted March 17, 2017 Hi, You can try setting autocomplete="off" on the form I guess Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2017 Share Posted March 17, 2017 Can you give a "part" of your code here?! Link to comment Share on other sites More sharing options...
MarkLince Posted March 17, 2017 Author Share Posted March 17, 2017 Hi Delphi Developer, Thanks for the quick reply as always. I thought some/ all browsers ignore autocomplete="off" with regard to password and username fields?? anyway, can you tell me where would I set that? Regards Mark Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2017 Share Posted March 17, 2017 Hi, Ok, can you try to use this approach?!: In your password edit box: 1. P1 -> ClientEvents -> ExtEvents -> function afterrender: function afterrender(sender, eOpts) { var me=sender.inputEl; me.set({ readonly: "readonly" }); } 2. P1 -> ClientEvents -> ExtEvents -> function focus: function focus(sender, e, eOpts) { var me=sender.inputEl; me.el.dom.removeAttribute('readonly'); } Best regards. Link to comment Share on other sites More sharing options...
Wilton Ergon Posted March 17, 2017 Share Posted March 17, 2017 I also need this, but component tuniMEdit does not have afterrender event I tried the initialize event, but to no avail. Another thing I noticed is that in the last version 1381, when I enter the value # in the passwordchar property,loading already shows a point in the field, as if I have already been informed, the password field does not show empty Link to comment Share on other sites More sharing options...
Sherzod Posted March 18, 2017 Share Posted March 18, 2017 Hi, I also need this, but component tuniMEdit does not have afterrender event For mobile you can use painted client event instead of afterrender Link to comment Share on other sites More sharing options...
Sherzod Posted March 18, 2017 Share Posted March 18, 2017 when I enter the value # in the passwordchar property, The password field is rendered natively by the browser Link to comment Share on other sites More sharing options...
MarkLince Posted March 18, 2017 Author Share Posted March 18, 2017 Hi Delphi Developer, Hi, Ok, can you try to use this approach?!: In your password edit box: 1. P1 -> ClientEvents -> ExtEvents -> function afterrender: function afterrender(sender, eOpts) { var me=sender.inputEl; me.set({ readonly: "readonly" }); } 2. P1 -> ClientEvents -> ExtEvents -> function focus: function focus(sender, e, eOpts) { var me=sender.inputEl; me.el.dom.removeAttribute('readonly'); } Best regards. This is why you are The Delphi Developer! Fantastic, thanks a lot. Mark Link to comment Share on other sites More sharing options...
Venon Posted April 26, 2018 Share Posted April 26, 2018 Hi, Ok, can you try to use this approach?!: In your password edit box: 1. P1 -> ClientEvents -> ExtEvents -> function afterrender: function afterrender(sender, eOpts) { var me=sender.inputEl; me.set({ readonly: "readonly" }); } 2. P1 -> ClientEvents -> ExtEvents -> function focus: function focus(sender, e, eOpts) { var me=sender.inputEl; me.el.dom.removeAttribute('readonly'); } Best regards. I added the snippet that you suggested to my two uniedits (login and password) in my login form and it worked. However I have another form that I use the passwordchar and in this screen does not work, I tried to add the events also in the uniedit of this other form but it did not work, but if I remove the passwordchar it works Would you have any tips to give me? https://ibb.co/fBhrtc Link to comment Share on other sites More sharing options...
Sherzod Posted April 27, 2018 Share Posted April 27, 2018 Hi, Can you please specify which edition and build of UniGUI are you using?! Link to comment Share on other sites More sharing options...
Venon Posted April 27, 2018 Share Posted April 27, 2018 Version:1.0.0 build 1397 Link to comment Share on other sites More sharing options...
Sherzod Posted April 27, 2018 Share Posted April 27, 2018 Version:1.0.0 build 1397 Trial edition or ?! Link to comment Share on other sites More sharing options...
Venon Posted April 27, 2018 Share Posted April 27, 2018 Trial edition Link to comment Share on other sites More sharing options...
Sherzod Posted April 28, 2018 Share Posted April 28, 2018 Hi, Version:1.0.0 build 1397 Trial edition Sorry, why? Use the latest trial edition. Link to comment Share on other sites More sharing options...
Freeman35 Posted June 3, 2018 Share Posted June 3, 2018 Not work with 1463. Ver.1463 has not ClientEvents -> ExtEvents -> function focus: MySolution is: Pass:= EDT_Pass.Text; EDT_Pass.Text:= ''; EDT_Pass.PasswordChar:= #0; ModalResult:=mrOK; 1 Link to comment Share on other sites More sharing options...
Abaksoft Posted June 9, 2018 Share Posted June 9, 2018 Not work with 1463. Ver.1463 has not ClientEvents -> ExtEvents -> function focus: MySolution is: Pass:= EDT_Pass.Text; EDT_Pass.Text:= ''; EDT_Pass.PasswordChar:= #0; ModalResult:=mrOK; Nice FreeMan35 +1 Link to comment Share on other sites More sharing options...
donlego Posted August 8, 2018 Share Posted August 8, 2018 hello i can' t find 2. P1 -> ClientEvents -> ExtEvents -> function focus: on tunitextbox/tunidbtextbox unigui ver 1472 delphi xe7 Link to comment Share on other sites More sharing options...
Abaksoft Posted October 14, 2018 Share Posted October 14, 2018 On 6/3/2018 at 12:46 PM, Freeman35 said: Not work with 1463. Ver.1463 has not ClientEvents -> ExtEvents -> function focus: MySolution is: Pass:= EDT_Pass.Text; EDT_Pass.Text:= ''; EDT_Pass.PasswordChar:= #0; ModalResult:=mrOK; Now, focus exists in Build 1480. Thx to Sherzod http://forums.unigui.com/index.php?/topic/10041-google-chrome-autofill-incorrectly-fill-all-password-related-edits-on-different-forms-with-same-text/&do=findComment&comment=52280 Link to comment Share on other sites More sharing options...
SISBLU Software Posted December 11, 2020 Share Posted December 11, 2020 has not ClientEvents -> ExtEvents -> function focus: Solution: ClientEvents -> ExtEvents -> function afterrender(sender, eOpts) { var me=sender.inputEl; me.set({ readonly: "readonly" }); sender.addListener( 'focus', function(sender, e, eOpts) { me.el.dom.removeAttribute('readonly'); } ); } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now