Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: SPCascadeDropDowns not working if parent field required even with jquery.SPServices-2014.01.js

$
0
0
I'm running into this same thing. Using jquery-1.10.2.min.js & jquery.SPServices-2014.01.js

Here is my call $(document).ready(function()
{
console.log("starting spcascade dropdown setup");
$().SPServices.SPCascadeDropdowns({
  relationshipWebURL: " ",
  relationshipList: "{ACBA409D-742D-4A96-A927-1518FA932069}",
  relationshipListParentColumn: "The_x0020_Site",
  relationshipListChildColumn: "Title",
  relationshipListSortColumn: "",
  parentColumn: "The Site",
  childColumn: "Info Needs #",
  CAMLQuery: "",
  listName: $().SPServices.SPListNameFromUrl(), 
  simpleChild: false, // Added in v0.6.2
  selectSingleOption: false, // Added in v0.6.2
  completefunc: function(){console.log("done")},
  debug: true
});
});

And here is the html for the parent column:

<SELECT name=ctl00$m$g_d64f3166_cbd0_41eb_82e0_4314c09fe213$ff12_1$ctl00$Lookup title="The Site Required Field" id=ctl00_m_g_d64f3166_cbd0_41eb_82e0_4314c09fe213_ff12_1_ctl00_Lookup>
<OPTION value=6 selected>.....</OPTION>
</SELECT>

I stepped through the spservices code and I think the problem is happening on line 3977:
if ((columnObj.Obj = $("select[Title='" + opt.displayName + "']")).length === 1)
since the title (The Site Required Field) doesn't equal the display name (The Site) exactly it doesn't find it.

Looks like russgove's hack to remove all the Required Field's from the title's is the way to go.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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