From http://spservices.codeplex.com/discussions/354984
Hi Marc,
I'm using jQuery 1.7.1 and SPServices 0.7.0 I have three custom lists,the only thing I changed was that I disabled attachments.
In the SharePoint form I have three fields (Manufacturer, Model and Site Name which correspond to the custom lists) and have SPAutocomplete for them, here is the code:
$().SPServices.SPAutocomplete({
sourceList: "Manufacturers",
sourceColumn: "Title",
columnName: "Manufacturer",
ignoreCase: true,
numChars: 3,
slideDownSpeed: 200,
highlightClass: "ms-bold",
filterType: 'Contains',
debug: false
});
//Apply autocomplete for Models list
$().SPServices.SPAutocomplete({
sourceList: "ServerModels",
sourceColumn: "Title",
columnName: "Model",
ignoreCase: true,
numChars: 2,
slideDownSpeed: 200,
highlightClass: "ms-bold",
filterType: 'Contains',
debug: false
});
//Apply autocomplete for Site Name list
$().SPServices.SPAutocomplete({
sourceList: "SiteName",
sourceColumn: "Title",
columnName: "Site Name",
ignoreCase: true,
numChars: 3,
slideDownSpeed: 200,
highlightClass: "ms-bold",
filterType: 'Contains',
debug: false
});
When I start typing in the "Site Name" input box the Autocomplete starts working fine (I see a dropdown with the text results), then I get to the "Manufacturer" field and when I start typing the Autocomplete dropdown comes out of the "Site Name" input box, I would expected to see the dropdown in the "Manufacturer" input box, as I start typing in the last field the dropdown still remains in the "Site Name" input box.
Comments: Hi Marc, Have just encountered this issue using SPAutocomplete in a Site Page with 2013.01. I upgraded to 2014.01 expecting to pick up the change above, but it doesn't seem to be there ... was this backed out after 2013.02ALPHA3? I've applied the change above and Autocomplete now works as expected in my Site Page, but concerned in case this may have implications elsewhere. Incidentally, I had to add extra parentheses within the return statement and write as ``` return funcname + "_" + ((staticName !== undefined && staticName !== "") ? staticName : columnName.replace(/ /g, '')); ``` to get this to work. I'd be grateful if you could let me know if this fix should be part of the codebase, or if this has been backed out for some reason. Thanks, Stuart
Hi Marc,
I'm using jQuery 1.7.1 and SPServices 0.7.0 I have three custom lists,the only thing I changed was that I disabled attachments.
In the SharePoint form I have three fields (Manufacturer, Model and Site Name which correspond to the custom lists) and have SPAutocomplete for them, here is the code:
$().SPServices.SPAutocomplete({
sourceList: "Manufacturers",
sourceColumn: "Title",
columnName: "Manufacturer",
ignoreCase: true,
numChars: 3,
slideDownSpeed: 200,
highlightClass: "ms-bold",
filterType: 'Contains',
debug: false
});
//Apply autocomplete for Models list
$().SPServices.SPAutocomplete({
sourceList: "ServerModels",
sourceColumn: "Title",
columnName: "Model",
ignoreCase: true,
numChars: 2,
slideDownSpeed: 200,
highlightClass: "ms-bold",
filterType: 'Contains',
debug: false
});
//Apply autocomplete for Site Name list
$().SPServices.SPAutocomplete({
sourceList: "SiteName",
sourceColumn: "Title",
columnName: "Site Name",
ignoreCase: true,
numChars: 3,
slideDownSpeed: 200,
highlightClass: "ms-bold",
filterType: 'Contains',
debug: false
});
When I start typing in the "Site Name" input box the Autocomplete starts working fine (I see a dropdown with the text results), then I get to the "Manufacturer" field and when I start typing the Autocomplete dropdown comes out of the "Site Name" input box, I would expected to see the dropdown in the "Manufacturer" input box, as I start typing in the last field the dropdown still remains in the "Site Name" input box.
Comments: Hi Marc, Have just encountered this issue using SPAutocomplete in a Site Page with 2013.01. I upgraded to 2014.01 expecting to pick up the change above, but it doesn't seem to be there ... was this backed out after 2013.02ALPHA3? I've applied the change above and Autocomplete now works as expected in my Site Page, but concerned in case this may have implications elsewhere. Incidentally, I had to add extra parentheses within the return statement and write as ``` return funcname + "_" + ((staticName !== undefined && staticName !== "") ? staticName : columnName.replace(/ /g, '')); ``` to get this to work. I'd be grateful if you could let me know if this fix should be part of the codebase, or if this has been backed out for some reason. Thanks, Stuart