I see what you are saying. genContainerId isn't respecting the listName that you've passed in. BUG!
I think this will fix it:
and changing the call to SPComplexToSimpleDropdown like this:
and then picking up the listName in SPComplexToSimpleDropdown:
While I'm at it, I'm adding listName as an option to SPComplexToSimpleDropdown, SPDisplayRelatedInfo, SPFilterDropdown, SPAutocomplete, and SPSetMultiSelectSizes.
M.
I think this will fix it:
// Generate a unique id for a containing div using the function name and the column display namefunction genContainerId(funcname, columnName, listName) { var l = listName !== undefined ? listName : $().SPServices.SPListNameFromUrl(); return funcname + "_" + $().SPServices.SPGetStaticFromDisplay({ listName: l, columnDisplayName: columnName }); } // End of function genContainerId
// If requested and the childColumn is a complex dropdown, convert to a simple dropdownif (opt.simpleChild === true&& childSelect.Type === dropdownType.complex) { $().SPServices.SPComplexToSimpleDropdown({ listName: opt.listName, columnName: opt.childColumn });
// function to convert complex dropdowns to simple dropdowns $.fn.SPServices.SPComplexToSimpleDropdown = function(options) { var opt = $.extend({}, { listName: $().SPServices.SPListNameFromUrl(), // The list the form is working with. This is useful if the form is not in the list context. columnName: "", // The display name of the column in the form completefunc: null, // Function to call on completion of rendering the change. debug: false// If true, show error messages;if false, run silent }, options); ... // Build up the simple dropdown, giving it an easy to select idvar simpleSelectId = genContainerId("SPComplexToSimpleDropdown", opt.columnName, opt.listName); ...
M.