This page shows how you can implement The SPAutocomplete function from SPServices on a SharePoint new item form. The Web Part on the left side of this page is the same List Form Web Part (LFWP) you would see on NewForm.aspx for a list.
The data shown is pulled from Y2000 US Census Data Survey of Business Owners and contains 3196 census "areas". Each item contains 42 columns of data about the "area", so the list is substantial. As you begin typing a value in the Title column, once you reach three characters you will see all of the matching values from the Areaname column shown in the List View Web Part (LVWP) below.
The demo is calling the SPAutocomplete function with the following options:
$(document).ready(function() {
$().SPServices.SPAutocomplete({
sourceList: "Census Data", // The name of the list which contains the values
sourceColumn: "Areaname", // The static name of the column which contains the values
columnName: "Title", // The display name of the column in the form
numChars: 3, // Wait until this number of characters has been typed before attempting any actions
ignoreCase: true, // If set to true, the function ignores case, if false it looks for an exact match
slideDownSpeed: 100, // Speed at which the div should slide down when values match (milliseconds or ["fast" | "slow"])
debug: true // If true, show error messages; if false, run silent
});
});
This page uses the SPAutocomplete function of the jQuery Library for SharePoint Web Services. The SPAutocomplete function was first released in v0.5.4.
You can download the jQuery for this demo here.