MarkLince 11 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 Quote Link to post Share on other sites
Sherzod 1148 Posted March 17, 2017 Share Posted March 17, 2017 Hi, You can try setting autocomplete="off" on the form I guess Quote Link to post Share on other sites
Sherzod 1148 Posted March 17, 2017 Share Posted March 17, 2017 Can you give a "part" of your code here?! Quote Link to post Share on other sites
MarkLince 11 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 Quote Link to post Share on other sites
Sherzod 1148 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. Quote Link to post Share on other sites
wilton_rad 45 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 Quote Link to post Share on other sites
Sherzod 1148 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 Quote Link to post Share on other sites
Sherzod 1148 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 Quote Link to post Share on other sites
MarkLince 11 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 Quote Link to post Share on other sites
Venon 1 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 Quote Link to post Share on other sites
Sherzod 1148 Posted April 27, 2018 Share Posted April 27, 2018 Hi, Can you please specify which edition and build of UniGUI are you using?! Quote Link to post Share on other sites
Venon 1 Posted April 27, 2018 Share Posted April 27, 2018 Version:1.0.0 build 1397 Quote Link to post Share on other sites
Sherzod 1148 Posted April 27, 2018 Share Posted April 27, 2018 Version:1.0.0 build 1397 Trial edition or ?! Quote Link to post Share on other sites
Venon 1 Posted April 27, 2018 Share Posted April 27, 2018 Trial edition Quote Link to post Share on other sites
Sherzod 1148 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. Quote Link to post Share on other sites
Freeman35 57 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 Quote Link to post Share on other sites
Abaksoft 348 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 Quote Link to post Share on other sites
donlego 9 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 Quote Link to post Share on other sites
Abaksoft 348 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 Quote Link to post Share on other sites
Daha Software 3 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'); } ); } Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.