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 Interview questions

What is Microsoft Windows SharePoint Services? How is it related to Microsoft Office SharePoint Server 2007? Windows SharePoint Services is the solution that enables you to create Web sites for information sharing and document collaboration. Windows SharePoint Services -- a key piece of the information worker infrastructure delivered in Microsoft Windows Server 2003 -- provides additional functionality to the Microsoft Office system and other desktop applications, and it serves as a platform for application development. Office SharePoint Server 2007 builds on top of Windows SharePoint Services 3.0 to provide additional capabilities including collaboration, portal, search, enterprise content management, business process and forms, and business intelligence. What is Microsoft SharePoint Portal Server? SharePoint Portal Server is a portal server that connects people, teams, and knowledge across business processes. SharePoint Portal Server integrates information from various systems into o

SharePoint 2010 Branding: Change site actions and welcome menu arrows

Here's how you can do it. Hide the image and give our custom image element a background image. Look Like: .ms-viewselector-arrow {     background: transparent url('/PublishingImages/images/Arrow.png') no-repeat scroll 0 0;     height: 4px; /* height of the image */     width: 5px; /* width of the image */ } .ms-viewselector-arrow img {     display: none; }

Lookup field does not showing values in sharepoint2013

SharePoint Custom Form Shows HTML as Text on Lookup Fields   When creating a custom display form on SharePoint Designer, the form displays the actual HTML instead of rendering the HTML on the lookup columns. For example, see the below image: For the lookup value issue, you need to slightly modify the XSLT of the particular field from designer and add the attribute disable-output-escaping="yes" to the field.