Quantcast
Viewing all articles
Browse latest Browse all 6517

Edited Unassigned: SPCascadeDropdowns Required Lookup issue [10256]

I hope that I can help someone to fix this problem, I investigated this problem some days ago, and I saw following lines of code with comments inside the $.fn.SPServices.SPDropdownCtl:


// Last ditch effort
// Simple, finding based at the top of the td.ms-formbody where the select's title begins with DisplayName - needed for required columns where title="DisplayName Required Field"
// Example: SP2010 <select name="ctl00$m$g_308135f8_3f59_4d67_b5f8_c26776c498b7$ff51$ctl00$Lookup" id="ctl00_m_g_308135f8_3f59_4d67_b5f8_c26776c498b7_ff51_ctl00_Lookup" title="Region Required Field">

if (columnObj.Type === null) {
var fieldContainer = findFormField(opt.displayName);
if (fieldContainer !== undefined) {
var fieldSelect = fieldContainer.find("select[title^='" + opt.displayName + "'][id$='$Lookup']");

if (fieldSelect && fieldSelect.length === 1) {
columnObj.Type = dropdownType.simple;
columnObj.Obj = fieldSelect;
}
}
}

Problem with required field was caused because -> fieldContainer.find("select[title^='" + opt.displayName + "'][id$='$Lookup']") has incorrect selection part [id$='$Lookup']". You should use "name" instead "id" or remove $ symbol from $Lookup, and after that everything should work fine

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>