This is a migrated thread and some comments may be shown as answers.

How to disable autocomplete with TextBox

3 Answers 4068 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Veteran
Michael asked on 01 Aug 2020, 09:27 AM

What's the best way to disable the autocomplete suggestions displayed when a user first clicks on a TextBox or is entering characters?

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 02 Aug 2020, 01:31 PM

Hello Michael,

You can set its Autocomplete parameter to the desired string value for the autocomplete attribute of the input that it will set. You can read more about it here: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete. The typical setting to instruct the browser to turn off suggestions is setting Autocomplete="off", yet it is up to the browser to honor this. Often it works only when the input is in a <form> that has autocomplete disabled altogether.

 

Regards,
Marin Bratanov
Progress Telerik

0
Daniel
Top achievements
Rank 1
Veteran
answered on 07 Apr 2021, 07:19 PM
A related question: how do I turn autocomplete ON. It seems to be off by default on my page but when I set AutoComplete="on" in TelerikTextBox it still does nothing. Then I read you need to make sure it has a unique Name attribute. But that did not help either. Any ideas?
0
Marin Bratanov
Telerik team
answered on 08 Apr 2021, 06:18 AM

Hi Daniel,

It is the browser that controls that, not our components. Enabling the autocomplete is one thing, but then the browser needs to decide to store values for it before the user can see suggestions. This usually happens when the input is in a form and the form gets submitted.

If you need to be sure your users get suggestions you want them to get, you can use the Telerik AutoComplete component. It is a textbox where they can put in arbitrary text, bit also lets you show them suggestions from your app, you can even load them on demand as they type.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TextBox
Asked by
Michael
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Daniel
Top achievements
Rank 1
Veteran
Share this question
or