RobYost Posted December 5, 2017 Share Posted December 5, 2017 Is there a way to turn off autofill (or maybe called autocomplete) in the application? When filling in the form the browser prompts to autofil the Edit fields on the screen. The information presented to autofill would never be the correct information, so I would like to turn it off in my program. It looks like it can be added to the form property, but I don't know how. <form method="post" action="/form" autocomplete="off"> Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2017 Share Posted December 6, 2017 Hi, Can you clarify your issue once again, or by making a testcase ?! Best regards, Quote Link to comment Share on other sites More sharing options...
RobYost Posted December 7, 2017 Author Share Posted December 7, 2017 In Chrome (and probably the other browsers as well) go to Settings->Advanced->Passwords and forms There you will see Autofill settings. In there you will see addresses: with a bunch of addresses (and credit cards), you have filled out on other web pages If you are on a web page that has what chrome thinks is an address it will prompt to put in one the saved addresses. In my case these addresses will never be correct, so I would like to NOT have Chrome prompt with the option to fill in the address fields. From what I found out on the internet if you have a form on a web page and add autocomplete="off" it will not prompt for autocomplete. eg. <form method="post" action="/form" autocomplete="off"> But I don't know how to add a parameter to the <form>. I am assuming that somehow we are generating a HTML form. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 7, 2017 Share Posted December 7, 2017 Hi, Please make a simple testcase for this Quote Link to comment Share on other sites More sharing options...
RobYost Posted December 8, 2017 Author Share Posted December 8, 2017 I don't know if it will autofill for you. From reading about autofill it looks like it trys to match things saved by your browser that match the form. So I named the fields Address, City, State, and Zipcode. For me, it suggests items to autofill AutoFill.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2017 Share Posted December 8, 2017 Ok, thanks for the testcase. We will check this Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2017 Share Posted December 8, 2017 Hi. One possible solution: MainmForm -> ClientEvents -> UniEvents -> Ext.form.Panel [form] -> function form.afterCreate: function form.afterCreate(sender) { sender.element.dom.setAttribute('autocomplete', 'off'); } Try, Best regards, Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 21, 2019 Share Posted January 21, 2019 Please , there is no MainmForm -> ClientEvents -> UniEvents -> Ext.form.Panel [form] -> function form.afterCreate, on my 1481 version, somthing that i can change to not allow auto fill ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2019 Share Posted January 22, 2019 7 hours ago, FFREDIANELLI said: there is no MainmForm -> ClientEvents -> UniEvents -> Ext.form.Panel [form] -> function form.afterCreate Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 22, 2019 Share Posted January 22, 2019 6 hours ago, Sherzod said: i explained wrongly , i was searching for afterrender, because if i put in after create the form do not open. like you can see in the images. removing it Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 22, 2019 Share Posted January 22, 2019 testcase , it's just a label with the command. testcase1.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2019 Share Posted January 22, 2019 30 minutes ago, FFREDIANELLI said: testcase , it's just a label with the command. Sorry, tell me exactly which platform (Desktop or mobile) you want to use. 14 hours ago, FFREDIANELLI said: Please , there is no MainmForm -> ClientEvents -> UniEvents -> Ext.form.Panel [form] -> function form.afterCreate MainmForm - It's a mobile form, your test case for the desktop ? May this post can help you, can you try?: Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 22, 2019 Share Posted January 22, 2019 Platform: Desktop Testcase is in the message sent one hour before your answer , with the name 'testcase1.rar' I think that the approach of putting events on each component of my form is not useful, because its not password, the browser is putting things with autosave in fields like 'Name'... the best is disable completely for the application. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2019 Share Posted January 22, 2019 18 minutes ago, FFREDIANELLI said: Testcase is in the message sent one hour before your answer , with the name 'testcase1.rar' Yes I saw, and you wanted to use a solution that is designed for a mobile platform OK We will think about it, but I think it may not always work correctly, in some cases, the browser will continue suggesting autocompletion values even if the autocomplete attribute is set to off (Google that)... Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 22, 2019 Share Posted January 22, 2019 Ok thanks, but how could i know that your solution was for mobile ? by opening the images that Rob sent... OK Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2019 Share Posted January 22, 2019 1 hour ago, FFREDIANELLI said: Ok thanks, but how could i know that your solution was for mobile ? by opening the images that Rob sent... Yes, sent screen is a mobile form, you can recognize it at least what the interface looks like and by this: On 12/8/2017 at 1:22 PM, Sherzod said: MainmForm -> ClientEvents -> UniEvents -> Ext.form.Panel [form] -> function form.afterCreate: MainmForm Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 22, 2019 Share Posted January 22, 2019 ok, thanks, only at dblookupcombobox and combobox the problem in realy 'a problem' because we can't see that is in our list, the chrome list is on top of it, all the others field we can type on top. Is it possible to say to unigui to open the list moved a litle bit do rigth, then our list will be not under the autocomplete list ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2019 Share Posted January 22, 2019 2 minutes ago, FFREDIANELLI said: ok, thanks, only at dblookupcombobox and combobox the problem in realy 'a problem' because we can't see that is in our list, the chrome list is on top of it, all the others field we can type on top. Is it possible to say to unigui to open the list moved a litle bit do rigth, then our list will be not under the autocomplete list ? Sorry, can you please explain ?! Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 22, 2019 Share Posted January 22, 2019 I will try, with my poor english, the chrome autocomplete open under the dblookupcombobox and dbcombobox a list of options that it thinks that are useful, the problem is that this list is on top of the original list of options of combobox, not allowing the user to see and chose the list provided by my program. So one simple solution is if i can define somewere in clientevents a command to the list open a litle bit left from the original place that is the begining of the component, it will llooks like this image. Or a more elegant way is open above the component , lide devexpress allow us with a property. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2019 Share Posted January 22, 2019 Maybe you wanted like this?!: procedure TMainForm.UniFormCreate(Sender: TObject); begin //An offset [x,y] to use in addition to the pickerAlign when positioning the picker. with UniDBLookupComboBox1.JSInterface do JSConfig('pickerOffset', [JSArray([-20,0])]); //JSConfig('pickerOffset', [JSArray([20,0])]); end; Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 23, 2019 Share Posted January 23, 2019 Almost Perfect ! thanks again ! , but... how can i calculate the (y-offset) of the pickeroffset ? in my first test i did by changing, testing, changing , testing... until arrive to the value -322, but i think that this will varry with font size ? i preffered changing to open on top, it looks more ellegant than my first idea. with cbpaises.JSInterface do JSConfig('pickerOffset', [JSArray([0,-322])]); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 23, 2019 Share Posted January 23, 2019 35 minutes ago, FFREDIANELLI said: i preffered changing to open on top, it looks more ellegant than my first idea. Try this: procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniDBLookupComboBox1.JSInterface do //JSConfig('pickerOffset', [JSArray([-20,0])]); JSConfig('pickerAlign', ['bl-tl']); end; Quote Link to comment Share on other sites More sharing options...
FFREDIANELLI Posted January 23, 2019 Share Posted January 23, 2019 You light up this forum !!! Perfect again ! thanks a lot. Suggestion to farshad , create a property for dblookup and combo , to open down or up. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 23, 2019 Share Posted January 23, 2019 Thanks a lot! And please, next time, create a new content if we are considering a question that differs from the main post. Quote Link to comment Share on other sites More sharing options...
ikaurov Posted May 29, 2019 Share Posted May 29, 2019 This solution did not help me: sender.element.dom.setAttribute('autocomplete', 'off'); But this one works good: UniSession.AddJS('$("input").attr("autocomplete", "off");'); 1 Quote Link to comment Share on other sites More sharing options...
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.