Skip to main content

Cascading Drop-down in SharePoint 2013

Cascading drop-down to NewForm.aspx  using OOTB .

You can also use the example to create 3 level cascading drop-down and as instructed download 2 jquery files and store them in SharePoint library. Then follow the steps.

Two jquery files to be downloaded are jquery-1.3.2.min.js by jquery.com and jquery.SPServices-0.6.2.zip in codeplex by Mark D. Anderson..

1.       Create List 1: PrimaryDomain

2.       Create List2 : SecondaryDomain and create a column name it continent (could be lookup to Primary domain list or single line of text)
  3.       Create List 3: SubDomain and Create a column name it Secondarydomian (could be lookup to county list or single line of test)
Create 3 columns in list 4.
1.       PrimaryDomain : Lookup to title of PrimaryDomain List
2.       SecondaryDomain: lookup to title of SecondaryDomain List
3.       SubDomain: Lookup to title of SubDomain List

Add the following code as in new.aspx and edit.aspx of list 4 using SharePoint Designer as instructed


script language="javascript" type="text/javascript" src="/sites/EA/Style Library/Scripts/Jquery/jquery-1.10.2.min.js"  /script
script language="javascript" type="text/javascript" src="/sites/EA/Style Library/Scripts/jquery.SPServices-0.7.0.min.js" /script

script language="javascript" type="text/javascript">
 $(document).ready(function() {
 $().SPServices.SPCascadeDropdowns({
 relationshipList: "Cities",
 relationshipListParentColumn: "Country",
 relationshipListChildColumn: "Title",
 relationshipListSortColumn: "Title",
 parentColumn: "Country",
 childColumn: "City",
 debug: true
 });
$().SPServices.SPCascadeDropdowns({
 relationshipList: "Hotels",
 relationshipListParentColumn: "City",
 relationshipListChildColumn: "Title",
 parentColumn: "City",
 childColumn: "Hotel",
 debug: true
 });
});
/script

Comments

Popular posts from this blog

SharePoint 2013 - Suggested Content Browser Locations

In SharePoint Site collection, we can configure “Suggested Content Browser Locations” to access the directories easily. When we configure these locations, we can see them as drop down to the users when we select the content SharePoint. To view this link, we need to activate the publishing feature. We can configure suggested content browser location at site collection level. To configure suggested content browser locations, navigate to Site Settings, in the Site Collection Administration section, click on “Suggested Content Browser Locations” link. We can see the list. Click on new item to create new suggested location link. To check the suggested content browser location navigates to any page, edit the page. Select Insert option. In the Select Asset dialog, We can see the Suggested link drop down as shown the image below.

Accordion "Left Navigation" (Quick Launch) for SharePoint 2013

For Expand/collapse "Left Navigation (Quick Launch) for sharepoint 2013 Copy the below code and paste in Master page jQuery(document).ready(function () {  /*set dynamic css logic*/  if($('#sideNavBox .menu-item.selected').length){   //propagates the selected class, up the three.   $('li.static').removeClass('selected');   $('#sideNavBox .menu-item.selected').parents('li.static').addClass('selected');   //collapses top siblings of selected branch   $('#sideNavBox .menu-item.selected').parents('li.static').last().siblings()    .find('> ul').hide();  }  else $('#sideNavBox .root.static > li.static > ul').hide();  /*set accordion effect*/  $('#sideNavBox .root.static > li.static').each(function(){   if($(this).find('ul').length){    $(this).addClass('father').click(function(){     if($(this).children('ul').css('display')...