Quantcast
Viewing all articles
Browse latest Browse all 6517

Commented Unassigned: SPCascadeDropdowns and Required Lookup not working [10250]

Dears,

As i mentioned at the Resolved issue, this still not working.

Looking at the source code, you use:
$("select:regex(id, (" + colStaticName + ")(_)[0-9a-fA-F]{8}(-))")

This is not going to work for me (Sharepoint 2010 Enterprise), because the generated ids does not contains the field name:
<select name="ctl00$m$g_6da0ab13_471d_47e1_8c9c_81483e315dae$ctl00$ctl05$ctl00$ctl00$ctl00$ctl04$ctl00$Lookup" title="Process Required Field" id="ctl00_m_g_6da0ab13_471d_47e1_8c9c_81483e315dae_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_Lookup">

The function needs to use the TITLE or the comment node.

I prefer to find the fields by the comment node, its much more realiable:
var searchStr = 'FieldInternalName="' + internalName + '"';

var elm = $("*").contents().filter(function(){ return (this.nodeType == 8 && this.nodeValue.indexOf(searchStr) >= 0);}).first();
Comments: It's not working for me either (although it was in a previous version). Tested in * sharepoint 2010 * ie8 If either parentColumn or childColumn fields are required fields, the cascade fails (silently even if debug is true). I've done some debugging and in $.fn.SpServices.SPCascadeDropdowns, your code checks ``` if (parentSelect.Obj.html() === null && opt.debug) And if (childSelect.Obj.html() === null && opt.debug) ``` however when one of the fields is 'required', parentSelect.Obj.html() returns undefined. So there are two issues, 1. $().SPServices.SPDropdownCtl isn't finding the field correctly, and 2. you're testing for null and the undefined condition is failing silently.

Viewing all articles
Browse latest Browse all 6517

Trending Articles