SPListViewFilter 1.5

I've published a new version of SharePoint list filter. Autocomplete is available in the new version:

SPListViewFilter 1.5 AutoComplete

jQuery and jQuery libraries with styles are requried by autocomplete functionality. I didn't add reference to them into SPListViewFilter' code because of this: 99% of the time it already is on a page. In addition it leaves the choise of version to end users.

AutoComplete on custom forms

Autocomplete uses handler located in the LAYOUTS folder and available by URL like this: http://SharePointSite/_layouts/SPListViewFilter/Handlers/FieldAutocompleteHandler.ashx. This handler takes three parameters: ListId, FieldId and Term (text for filtering).

Here is a simple JavaScript function, which binds autocomplete to the TextBox with id "AutoCompleteTextBox":

  1. function SetAutoComplete(listId, fieldId) {
  2.   var baseUrl = "/_layouts/ListViewFilter/Handlers/FieldAutocompleteHandler.ashx";
  3.   $("#AutoCompleteTextBox").autocomplete({
  4.     source: baseUrl + "?List=" + listId + "&Field=" + fieldId,
  5.     minLength: 2
  6.   });
  7. });

Other parameters of autocomplete plugin may be viewed on www.jqueryui.com.

Vitaly Zhukov

Vitaly Zhukov

SharePoint Architect, Developer, Technical Trainer, Microsoft MVP (Office Development). Above 15 years of total experience working with SharePoint, Dynamics CRM, Office 365, and Microsoft stack development.

You May Also Like

MVP Award 2020 for Office Development

MVP Award 2020 for Office Development

Global Azure Bootcamp 2019

Global Azure Bootcamp 2019

SharePoint List Filter 3.03

SharePoint List Filter 3.03

SharePoint List Filter 3.0

SharePoint List Filter 3.0

SPListViewFilter 1.7

SPListViewFilter 1.7

SPListViewFilter 1.6

SPListViewFilter 1.6