I have created a cascading dropdown list in sharepoint. My problem is, after I select my parent column, the subsequent child column does not change to match it. For example: I select Australia from a drop down, the states drop down has Vic, NSW etc. When I change the country drop down to USA, the states drop down still has VIC, NSW etc.
-
How did you create it? SharePoint out of the box does not support cascading drop downs - you need JavaScript code to do it. What does your code look like?mannaggia– mannaggia2016-12-06 00:02:49 +00:00Commented Dec 6, 2016 at 0:02
-
Yeah I did add some code. I followed the site youtube.com/watchv=Q0L9cnSvVjA which shows the code they add at the 4 minute mark, and again at the 8 minute markBrandon– Brandon2016-12-06 00:15:00 +00:00Commented Dec 6, 2016 at 0:15
-
How did you create it? Can you share some code or tell us how you did it?Mohamed Derhalli– Mohamed Derhalli2016-12-06 02:01:08 +00:00Commented Dec 6, 2016 at 2:01
-
<script src=”//code.jquery.com/jquery-1.11.0.min.js”></script> //cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.01/jquery.SPServices.min.js <script type=”text/javascript”> $(document).ready(function(){ $().SPServices.SPCascadeDropdowns({ relationshipList: “Sub Competency”, relationshipListParentColumn: “Competency”, relationshipListChildColumn: “Title”, parentColumn: “Competency”, childColumn: “Sub Competency”, debug: true }) }) </script>Brandon– Brandon2016-12-06 03:23:20 +00:00Commented Dec 6, 2016 at 3:23
-
have you used SPServices.SPCascadeDropdownsAkshay Dattatray Nangare– Akshay Dattatray Nangare2016-12-06 05:07:31 +00:00Commented Dec 6, 2016 at 5:07
|
Show 1 more comment
1 Answer
Please see http://www.codeproject.com/Tips/758909/Two-Level-Cascading-Drop-Down-in-SharePoint-using article.
$(document).ready(function(){
$().SPServices.SPCascadeDropdowns({
relationshipList: "states",
relationshipListParentColumn: "Country",
relationshipListChildColumn: "Title",
parentColumn: "Country",
childColumn: "State",
debug: true
});
$().SPServices.SPCascadeDropdowns({
relationshipList: "City",
relationshipListParentColumn: "State",
relationshipListChildColumn: "Title",
parentColumn: "State",
childColumn: "City",
debug: true
});
});