This project has moved. For the latest updates, please go here.

Clear Autocomplete Input Textbox

Jul 25, 2013 at 8:50 AM
Can some one help me on clearing the Autocomplete Input box. The scenario is as below
  1. When a user types some char in the autocomplete textbox, drop down will be visible with the values.
  2. If the user doesnt select any from the dropdown list and moves out of the control then i want to clear the text box as well as the drop down should not be visible. The below is the code
$(document).ready(function () {
        sourceList: "List1",
        sourceColumn: "ListItemName",
        columnName: "txtListItem",
        ignoreCase: true,
        numChars: 2,
        slideDownSpeed: 1,
        debug: false
It will be great if some one can guide me on how we can achieve the same.

Suresh A
Jul 25, 2013 at 3:49 PM

The SPAutocomplete function in SPServices is pretty simple. I'd suggest using jQueryUI's autocomplete with SPServices to provide the data. You could also bind to events on the Single line of text input element to add to the existing behavior.