Skip to Content
0

Disable field history on an input field

Apr 25 at 04:32 PM

61

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Jakob Marius Kjær Apr 26 at 02:57 AM
0

Use the showSuggestion property and set it to false

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 26 at 05:26 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
VIPLOVE KHUSHALANI Apr 27 at 06:37 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded