Skip to Content
avatar image
Former Member

Disable field history on an input field

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 26 at 02:57 AM

    Use the showSuggestion property and set it to false

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 26 at 05:26 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 27 at 06:37 AM

    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

    Add comment
    10|10000 characters needed characters exceeded