cancel
Showing results for 
Search instead for 
Did you mean: 

autocomplete attribute of sap.m.Input and sap.ui.comp.SmartField

MioYasutake
Active Contributor
0 Kudos

Hi experts.

We currently use SAPUI5 verion 1.60.18.

Here, autocomplete attribute of sap.m.Input and sap.ui.comp.SmartField are "on" by default.

For versions greater than 1.65, autocomplete default value is "off".

We'd like to disable autocomplete for our apps and trying to find a way.

So far, I've found a solution for sap.m.Input: turning on "showSuggestion".

However, I have no idea how I can achieve the same for SmartField.

Does anybody have an idea?

Best regards,

Mio Yasutake

MioYasutake
Active Contributor
0 Kudos

Just to make it clear. This is regarding browser's autocomplete functrion.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi, Mio Yasutake,

I was facing a similar problem, and came up with the following solution:

You can briefly set the Type of Input to 'Password' and reset ist right after - the first operation disable the autocomplete and the second restoring the visibility of Input values:

onLiveChange: function (oEvent) {
	oEvent.getSource().setType("Password");
	oEvent.getSource().setType("Text");
},

I hope that helps. Best wishes, Konstantin

MioYasutake
Active Contributor
0 Kudos

Hi kostya_1990,

Thanks for sharing this.

Another solution would be to set SmartField's historyEnabled property to false.

It is available since UI5 version 1.78, as mentioned in the following blog post.

https://blogs.sap.com/2020/12/21/ui5ers-buzz-57-recently-used-values-history-for-smart-controls/