on 04-25-2018 5:32 PM
Hi ,
I am wondering whether it is possible to disable, on an input field (sap.m.Input), the list of values previously entered.
Currently when the user clicks on the input field, the list of previously entered values appear and we would like to disable it.
Is that possible?
Best regards
Javier
Hello,
This works for me,
thank for idea gaurav.shami ...
read this: https://bugs.chromium.org/p/chromium/issues/detail?id=370363#c7
onAfterRendering: function () {
$(".sapMInputBaseInner").attr("autocomplete", 'new-password');
/* Idea from Gaurav Shami
setInterval(function () {
var sRandomStr = (Math.random() + 1).toString(36).substring(7);
$(".sapMInputBaseInner").attr("autocomplete", sRandomStr);
}, 1000);
*/
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works for me, to avoid previously entered value list, also setting attribute autocomplete off does not work.
setInterval(function()
{
let sRandomStr = (Math.random() + 1).toString(36).substring(7);
$(".sapMInputBaseInner").attr("autocomplete", sRandomStr);
}, 1000);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, all. I was facing a similar problem, and came up with a sneaky 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I think you can't do it by fiori or ui5 input control properties or attributes ..
Try using javascript in the controller to do this for you .. you can put this code in you onInit event handler .. Just get the HTML input control using the Id and add the property autocomplete="off" or autocomplete = false .. (DOM manipulation .. use createAttribute to add the autocomplete attribute with value off or false https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_document_createattribute)
Thanks
Viplove
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jakob,
thank you for your answer, but according to the documentation for the showSuggestion
If this is set to true, suggest event is fired when user types in the input. Changing the suggestItems aggregation in suggest event listener will show suggestions within a popup. When runs on phone, input will first open a dialog where the input and suggestions are shown. When runs on a tablet, the suggestions are shown in a popup next to the input.
As far as I know this is used when we link the field to a table on the backend an suggestions are shown to the user based on that table.
What I mean is the values the user entered in previous executions, this history you can actually see in any field in a regular form in internet websites. So I am thinking that maybe this is linked to the browser (chrome, IE, or the fiori client itself) and it cannot be controlled from the Input component.
Maybe there is an option in fiori client to deactivate this.
Best regards,
Javier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the showSuggestion property and set it to false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.